diff options
author | jsorg71 <jsorg71> | 2005-11-03 02:01:50 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2005-11-03 02:01:50 +0000 |
commit | 523ea69fa574dbcbe9e261c8664c8e93f18eb09d (patch) | |
tree | 180fed20bd3e54ca7af1d0c02115769b54a0857b /rdp/rdp_tcp.c | |
parent | 05ec6aa2d59efcf4c489bd3d7decd83be384157c (diff) | |
download | xrdp-proprietary-523ea69fa574dbcbe9e261c8664c8e93f18eb09d.tar.gz xrdp-proprietary-523ea69fa574dbcbe9e261c8664c8e93f18eb09d.zip |
early rdp module work
Diffstat (limited to 'rdp/rdp_tcp.c')
-rw-r--r-- | rdp/rdp_tcp.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/rdp/rdp_tcp.c b/rdp/rdp_tcp.c index d5a13c9b..d136a8be 100644 --- a/rdp/rdp_tcp.c +++ b/rdp/rdp_tcp.c @@ -57,8 +57,11 @@ rdp_tcp_recv(struct rdp_tcp* self, struct stream* s, int len) { int rcvd; + DEBUG((" in rdp_tcp_recv gota get %d bytes on sck %d\r\n", + len, self->sck)); if (self->sck_closed) { + DEBUG((" out rdp_tcp_recv error sck closed\r\n")); return 1; } init_stream(s, len); @@ -74,12 +77,14 @@ rdp_tcp_recv(struct rdp_tcp* self, struct stream* s, int len) else { self->sck_closed = 1; + DEBUG((" out rdp_tcp_recv error unknown\r\n")); return 1; } } else if (rcvd == 0) { self->sck_closed = 1; + DEBUG((" out rdp_tcp_recv error connection dropped\r\n")); return 1; } else @@ -102,9 +107,12 @@ rdp_tcp_send(struct rdp_tcp* self, struct stream* s) if (self->sck_closed) { + DEBUG((" out rdp_tcp_send error sck closed\r\n")); return 1; } len = s->end - s->data; + DEBUG((" in rdp_tcp_send gota send %d bytes on sck %d\r\n", len, + self->sck)); total = 0; while (total < len) { @@ -118,12 +126,14 @@ rdp_tcp_send(struct rdp_tcp* self, struct stream* s) else { self->sck_closed = 1; + DEBUG((" out rdp_tcp_send error unknown\r\n")); return 1; } } else if (sent == 0) { self->sck_closed = 1; + DEBUG((" out rdp_tcp_send error connection dropped\r\n")); return 1; } else @@ -139,6 +149,7 @@ rdp_tcp_send(struct rdp_tcp* self, struct stream* s) int APP_CC rdp_tcp_connect(struct rdp_tcp* self, char* ip, char* port) { + DEBUG((" in rdp_tcp_connect ip %s port %s\r\n", ip, port)); self->sck = g_tcp_socket(); if (g_tcp_connect(self->sck, ip, port) == 0) { @@ -146,8 +157,10 @@ rdp_tcp_connect(struct rdp_tcp* self, char* ip, char* port) } else { + DEBUG((" out rdp_tcp_connect error g_tcp_connect failed\r\n")); return 1; } + DEBUG((" out rdp_tcp_connect\r\n")); return 0; } |