summaryrefslogtreecommitdiffstats
path: root/common/trans.c
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2013-10-02 16:27:12 -0700
committerJay Sorg <jay.sorg@gmail.com>2013-10-02 16:27:12 -0700
commit25369460a1b2f204d03a6bc4821251d7ef2d7adf (patch)
treed0c1ad0dac826abfa34c15e4b9b06dc76f2352c6 /common/trans.c
parent7176f1464710fd809af92ae3c2fcf9412eda9ace (diff)
downloadxrdp-proprietary-25369460a1b2f204d03a6bc4821251d7ef2d7adf.tar.gz
xrdp-proprietary-25369460a1b2f204d03a6bc4821251d7ef2d7adf.zip
log client ip with pid, etc
Diffstat (limited to 'common/trans.c')
-rw-r--r--common/trans.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/common/trans.c b/common/trans.c
index 5d5c6125..bb349298 100644
--- a/common/trans.c
+++ b/common/trans.c
@@ -197,7 +197,8 @@ trans_check_wait_objs(struct trans *self)
{
if (g_tcp_can_recv(self->sck, 0))
{
- in_sck = g_tcp_accept(self->sck);
+ in_sck = g_sck_accept(self->sck, self->addr, sizeof(self->addr),
+ self->port, sizeof(self->port));
if (in_sck == -1)
{
@@ -223,6 +224,8 @@ trans_check_wait_objs(struct trans *self)
in_trans->type1 = TRANS_TYPE_SERVER;
in_trans->status = TRANS_STATUS_UP;
in_trans->is_term = self->is_term;
+ g_strncpy(in_trans->addr, self->addr, sizeof(self->addr) - 1);
+ g_strncpy(in_trans->port, self->port, sizeof(self->port) - 1);
if (self->trans_conn_in(self, in_trans) != 0)
{
@@ -466,7 +469,7 @@ trans_write_copy(struct trans *self)
{
temp_s = (struct stream *) (temp_s->next_packet);
}
- temp_s->next_packet = wait_s;
+ temp_s->next_packet = (char *) wait_s;
}
return 0;
}