diff options
author | jsorg71 <jsorg71> | 2006-04-29 01:47:06 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2006-04-29 01:47:06 +0000 |
commit | 770a27bfb39a64cb742f73156cfb1071fe8fd603 (patch) | |
tree | e65373df2434b8c6718f82bc9a8f7430bb863111 /libxrdp | |
parent | b1b3ff9e7d31da5fbfeedd3df8e40be240112f9c (diff) | |
download | xrdp-proprietary-770a27bfb39a64cb742f73156cfb1071fe8fd603.tar.gz xrdp-proprietary-770a27bfb39a64cb742f73156cfb1071fe8fd603.zip |
printf -> writeln
Diffstat (limited to 'libxrdp')
-rw-r--r-- | libxrdp/libxrdp.c | 12 | ||||
-rw-r--r-- | libxrdp/xrdp_iso.c | 16 | ||||
-rw-r--r-- | libxrdp/xrdp_mcs.c | 18 | ||||
-rw-r--r-- | libxrdp/xrdp_orders.c | 28 | ||||
-rw-r--r-- | libxrdp/xrdp_rdp.c | 94 | ||||
-rw-r--r-- | libxrdp/xrdp_sec.c | 34 | ||||
-rw-r--r-- | libxrdp/xrdp_tcp.c | 20 |
7 files changed, 111 insertions, 111 deletions
diff --git a/libxrdp/libxrdp.c b/libxrdp/libxrdp.c index 8a02c7f7..79c93278 100644 --- a/libxrdp/libxrdp.c +++ b/libxrdp/libxrdp.c @@ -85,7 +85,7 @@ libxrdp_process_data(struct xrdp_session* session) rv = 1; break; } - DEBUG(("libxrdp_process_data code %d\r\n", code)); + DEBUG(("libxrdp_process_data code %d", code)); switch (code) { case -1: @@ -102,13 +102,13 @@ libxrdp_process_data(struct xrdp_session* session) if (xrdp_rdp_process_data((struct xrdp_rdp*)session->rdp, session->s) != 0) { - DEBUG(("libxrdp_process_data returned non zero\r\n")); + DEBUG(("libxrdp_process_data returned non zero")); cont = 0; session->term = 1; } break; default: - g_printf("unknown in libxrdp_process_data\r\n"); + g_writeln("unknown in libxrdp_process_data"); break; } if (cont) @@ -257,11 +257,11 @@ libxrdp_send_bitmap(struct xrdp_session* session, int width, int height, } if (j > 32768) { - g_printf("error, decompressed size too big, its %d\r\n", j); + g_writeln("error, decompressed size too big, its %d", j); } if (bufsize > 8192) { - g_printf("error, compressed size too big, its %d\r\n", bufsize); + g_writeln("error, compressed size too big, its %d", bufsize); } s->p = s->end; } while (total_bufsize < 4096 && i > 0); @@ -271,7 +271,7 @@ libxrdp_send_bitmap(struct xrdp_session* session, int width, int height, RDP_DATA_PDU_UPDATE); if (total_bufsize > 8192) { - g_printf("error, total compressed size too big, its %d\r\n", + g_writeln("error, total compressed size too big, its %d", total_bufsize); } } diff --git a/libxrdp/xrdp_iso.c b/libxrdp/xrdp_iso.c index 0be40e0c..3ab56c2b 100644 --- a/libxrdp/xrdp_iso.c +++ b/libxrdp/xrdp_iso.c @@ -90,18 +90,18 @@ xrdp_iso_recv(struct xrdp_iso* self, struct stream* s) { int code; - DEBUG((" in xrdp_iso_recv\r\n")); + DEBUG((" in xrdp_iso_recv")); if (xrdp_iso_recv_msg(self, s, &code) != 0) { - DEBUG((" out xrdp_iso_recv xrdp_iso_recv_msg return non zero\r\n")); + DEBUG((" out xrdp_iso_recv xrdp_iso_recv_msg return non zero")); return 1; } if (code != ISO_PDU_DT) { - DEBUG((" out xrdp_iso_recv code != ISO_PDU_DT\r\n")); + DEBUG((" out xrdp_iso_recv code != ISO_PDU_DT")); return 1; } - DEBUG((" out xrdp_iso_recv\r\n")); + DEBUG((" out xrdp_iso_recv")); return 0; } @@ -139,7 +139,7 @@ xrdp_iso_incoming(struct xrdp_iso* self) make_stream(s); init_stream(s, 8192); - DEBUG((" in xrdp_iso_incoming\r\n")); + DEBUG((" in xrdp_iso_incoming")); if (xrdp_iso_recv_msg(self, s, &code) != 0) { free_stream(s); @@ -155,7 +155,7 @@ xrdp_iso_incoming(struct xrdp_iso* self) free_stream(s); return 1; } - DEBUG((" out xrdp_iso_incoming\r\n")); + DEBUG((" out xrdp_iso_incoming")); free_stream(s); return 0; } @@ -177,7 +177,7 @@ xrdp_iso_send(struct xrdp_iso* self, struct stream* s) { int len; - DEBUG((" in xrdp_iso_send\r\n")); + DEBUG((" in xrdp_iso_send")); s_pop_layer(s, iso_hdr); len = s->end - s->p; out_uint8(s, 3); @@ -190,6 +190,6 @@ xrdp_iso_send(struct xrdp_iso* self, struct stream* s) { return 1; } - DEBUG((" out xrdp_iso_send\r\n")); + DEBUG((" out xrdp_iso_send")); return 0; } diff --git a/libxrdp/xrdp_mcs.c b/libxrdp/xrdp_mcs.c index 67766dd7..0c589a02 100644 --- a/libxrdp/xrdp_mcs.c +++ b/libxrdp/xrdp_mcs.c @@ -90,19 +90,19 @@ xrdp_mcs_recv(struct xrdp_mcs* self, struct stream* s, int* chan) int opcode; int len; - DEBUG((" in xrdp_mcs_recv\r\n")); + DEBUG((" in xrdp_mcs_recv")); while (1) { if (xrdp_iso_recv(self->iso_layer, s) != 0) { - DEBUG((" out xrdp_mcs_recv xrdp_iso_recv returned non zero\r\n")); + DEBUG((" out xrdp_mcs_recv xrdp_iso_recv returned non zero")); return 1; } in_uint8(s, opcode); appid = opcode >> 2; if (appid == MCS_DPUM) { - DEBUG((" out xrdp_mcs_recv appid != MCS_DPUM\r\n")); + DEBUG((" out xrdp_mcs_recv appid != MCS_DPUM")); return 1; } if (appid == MCS_CJRQ) @@ -114,7 +114,7 @@ xrdp_mcs_recv(struct xrdp_mcs* self, struct stream* s, int* chan) } if (appid != MCS_SDRQ) { - DEBUG((" out xrdp_mcs_recv err got 0x%x need MCS_SDRQ\r\n", appid)); + DEBUG((" out xrdp_mcs_recv err got 0x%x need MCS_SDRQ", appid)); return 1; } in_uint8s(s, 2); @@ -125,7 +125,7 @@ xrdp_mcs_recv(struct xrdp_mcs* self, struct stream* s, int* chan) { in_uint8s(s, 1); } - DEBUG((" out xrdp_mcs_recv\r\n")); + DEBUG((" out xrdp_mcs_recv")); return 0; } @@ -523,7 +523,7 @@ xrdp_mcs_send_connect_response(struct xrdp_mcs* self) int APP_CC xrdp_mcs_incoming(struct xrdp_mcs* self) { - DEBUG((" in xrdp_mcs_incoming\r\n")); + DEBUG((" in xrdp_mcs_incoming")); if (xrdp_iso_incoming(self->iso_layer) != 0) { return 1; @@ -564,7 +564,7 @@ xrdp_mcs_incoming(struct xrdp_mcs* self) { return 1; } - DEBUG((" out xrdp_mcs_incoming\r\n")); + DEBUG((" out xrdp_mcs_incoming")); return 0; } @@ -585,7 +585,7 @@ xrdp_mcs_send(struct xrdp_mcs* self, struct stream* s) { int len; - DEBUG((" in xrdp_mcs_send\r\n")); + DEBUG((" in xrdp_mcs_send")); s_pop_layer(s, mcs_hdr); len = (s->end - s->p) - 8; len = len | 0x8000; @@ -598,7 +598,7 @@ xrdp_mcs_send(struct xrdp_mcs* self, struct stream* s) { return 1; } - DEBUG((" out xrdp_mcs_send\r\n")); + DEBUG((" out xrdp_mcs_send")); return 0; } diff --git a/libxrdp/xrdp_orders.c b/libxrdp/xrdp_orders.c index 9585ebcf..82acd091 100644 --- a/libxrdp/xrdp_orders.c +++ b/libxrdp/xrdp_orders.c @@ -119,7 +119,7 @@ xrdp_orders_send(struct xrdp_orders* self) if (self->order_level == 0 && self->order_count > 0) { s_mark_end(self->out_s); - DEBUG(("xrdp_orders_send sending %d orders\r\n", self->order_count)); + DEBUG(("xrdp_orders_send sending %d orders", self->order_count)); self->order_count_ptr[0] = self->order_count; self->order_count_ptr[1] = self->order_count >> 8; self->order_count = 0; @@ -141,7 +141,7 @@ xrdp_orders_force_send(struct xrdp_orders* self) if (self->order_level > 0 && self->order_count > 0) { s_mark_end(self->out_s); - DEBUG(("xrdp_orders_force_send sending %d orders\r\n", self->order_count)); + DEBUG(("xrdp_orders_force_send sending %d orders", self->order_count)); self->order_count_ptr[0] = self->order_count; self->order_count_ptr[1] = self->order_count >> 8; if (xrdp_rdp_send_data(self->rdp_layer, self->out_s, @@ -1478,12 +1478,12 @@ xrdp_orders_send_raw_bitmap(struct xrdp_orders* self, if (width > 64) { - g_printf("error, width > 64\r\n"); + g_writeln("error, width > 64"); return 1; } if (height > 64) { - g_printf("error, height > 64\r\n"); + g_writeln("error, height > 64"); return 1; } e = width % 4; @@ -1560,12 +1560,12 @@ xrdp_orders_send_bitmap(struct xrdp_orders* self, if (width > 64) { - g_printf("error, width > 64\r\n"); + g_writeln("error, width > 64"); return 1; } if (height > 64) { - g_printf("error, height > 64\r\n"); + g_writeln("error, height > 64"); return 1; } e = width % 4; @@ -1585,8 +1585,8 @@ xrdp_orders_send_bitmap(struct xrdp_orders* self, { free_stream(s); free_stream(temp_s); - g_printf("error in xrdp_orders_send_bitmap, lines_sending(%d) != \ -height(%d)\r\n", lines_sending, height); + g_writeln("error in xrdp_orders_send_bitmap, lines_sending(%d) != \ +height(%d)", lines_sending, height); return 1; } bufsize = s->p - p; @@ -1681,12 +1681,12 @@ xrdp_orders_send_raw_bitmap2(struct xrdp_orders* self, if (width > 64) { - g_printf("error, width > 64\r\n"); + g_writeln("error, width > 64"); return 1; } if (height > 64) { - g_printf("error, height > 64\r\n"); + g_writeln("error, height > 64"); return 1; } e = width % 4; @@ -1764,12 +1764,12 @@ xrdp_orders_send_bitmap2(struct xrdp_orders* self, if (width > 64) { - g_printf("error, width > 64\r\n"); + g_writeln("error, width > 64"); return 1; } if (height > 64) { - g_printf("error, height > 64\r\n"); + g_writeln("error, height > 64"); return 1; } e = width % 4; @@ -1789,8 +1789,8 @@ xrdp_orders_send_bitmap2(struct xrdp_orders* self, { free_stream(s); free_stream(temp_s); - g_printf("error in xrdp_orders_send_bitmap2, lines_sending(%d) != \ -height(%d)\r\n", lines_sending, height); + g_writeln("error in xrdp_orders_send_bitmap2, lines_sending(%d) != \ +height(%d)", lines_sending, height); return 1; } bufsize = s->p - p; diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c index 3aebcb28..45a29d1b 100644 --- a/libxrdp/xrdp_rdp.c +++ b/libxrdp/xrdp_rdp.c @@ -179,7 +179,7 @@ xrdp_rdp_recv(struct xrdp_rdp* self, struct stream* s, int* code) int pdu_code; int chan; - DEBUG(("in xrdp_rdp_recv\r\n")); + DEBUG(("in xrdp_rdp_recv")); if (s->next_packet == 0 || s->next_packet >= s->end) { chan = 0; @@ -188,19 +188,19 @@ xrdp_rdp_recv(struct xrdp_rdp* self, struct stream* s, int* code) { s->next_packet = 0; *code = -1; - DEBUG(("out xrdp_rdp_recv\r\n")); + DEBUG(("out xrdp_rdp_recv")); return 0; } if (error != 0) { - DEBUG(("out xrdp_rdp_recv error\r\n")); + DEBUG(("out xrdp_rdp_recv error")); return 1; } if (chan != MCS_GLOBAL_CHANNEL && chan > 0) { s->next_packet = 0; *code = 0; - DEBUG(("out xrdp_rdp_recv\r\n")); + DEBUG(("out xrdp_rdp_recv")); return 0; } s->next_packet = s->p; @@ -214,14 +214,14 @@ xrdp_rdp_recv(struct xrdp_rdp* self, struct stream* s, int* code) { s->next_packet += 8; *code = 0; - DEBUG(("out xrdp_rdp_recv\r\n")); + DEBUG(("out xrdp_rdp_recv")); return 0; } in_uint16_le(s, pdu_code); *code = pdu_code & 0xf; in_uint8s(s, 2); /* mcs user id */ s->next_packet += len; - DEBUG(("out xrdp_rdp_recv\r\n")); + DEBUG(("out xrdp_rdp_recv")); return 0; } @@ -231,7 +231,7 @@ xrdp_rdp_send(struct xrdp_rdp* self, struct stream* s, int pdu_type) { int len; - DEBUG(("in xrdp_rdp_send\r\n")); + DEBUG(("in xrdp_rdp_send")); s_pop_layer(s, rdp_hdr); len = s->end - s->p; out_uint16_le(s, len); @@ -239,10 +239,10 @@ xrdp_rdp_send(struct xrdp_rdp* self, struct stream* s, int pdu_type) out_uint16_le(s, self->mcs_channel); if (xrdp_sec_send(self->sec_layer, s) != 0) { - DEBUG(("out xrdp_rdp_send error\r\n")); + DEBUG(("out xrdp_rdp_send error")); return 1; } - DEBUG(("out xrdp_rdp_send\r\n")); + DEBUG(("out xrdp_rdp_send")); return 0; } @@ -253,7 +253,7 @@ xrdp_rdp_send_data(struct xrdp_rdp* self, struct stream* s, { int len; - DEBUG(("in xrdp_rdp_send_data\r\n")); + DEBUG(("in xrdp_rdp_send_data")); s_pop_layer(s, rdp_hdr); len = s->end - s->p; out_uint16_le(s, len); @@ -268,10 +268,10 @@ xrdp_rdp_send_data(struct xrdp_rdp* self, struct stream* s, out_uint16_le(s, 0); if (xrdp_sec_send(self->sec_layer, s) != 0) { - DEBUG(("out xrdp_rdp_send_data error\r\n")); + DEBUG(("out xrdp_rdp_send_data error")); return 1; } - DEBUG(("out xrdp_rdp_send_data\r\n")); + DEBUG(("out xrdp_rdp_send_data")); return 0; } @@ -321,7 +321,7 @@ xrdp_rdp_parse_client_mcs_data(struct xrdp_rdp* self) self->client_info.bpp = 16; } p->p = p->data; - DEBUG(("client width %d, client height %d bpp %d\r\n", + DEBUG(("client width %d, client height %d bpp %d", self->client_info.width, self->client_info.height, self->client_info.bpp)); return 0; @@ -331,7 +331,7 @@ xrdp_rdp_parse_client_mcs_data(struct xrdp_rdp* self) int APP_CC xrdp_rdp_incoming(struct xrdp_rdp* self) { - DEBUG(("in xrdp_rdp_incoming\r\n")); + DEBUG(("in xrdp_rdp_incoming")); if (xrdp_sec_incoming(self->sec_layer) != 0) { return 1; @@ -339,7 +339,7 @@ xrdp_rdp_incoming(struct xrdp_rdp* self) self->mcs_channel = self->sec_layer->mcs_layer->userid + MCS_USERCHANNEL_BASE; xrdp_rdp_parse_client_mcs_data(self); - DEBUG(("out xrdp_rdp_incoming mcs channel %d\r\n", self->mcs_channel)); + DEBUG(("out xrdp_rdp_incoming mcs channel %d", self->mcs_channel)); return 0; } @@ -528,11 +528,11 @@ xrdp_process_capset_bmpcache(struct xrdp_rdp* self, struct stream* s, in_uint16_le(s, self->client_info.cache2_size); in_uint16_le(s, self->client_info.cache3_entries); in_uint16_le(s, self->client_info.cache3_size); - DEBUG(("cache1 entries %d size %d\r\n", self->client_info.cache1_entries, + DEBUG(("cache1 entries %d size %d", self->client_info.cache1_entries, self->client_info.cache1_size)); - DEBUG(("cache2 entries %d size %d\r\n", self->client_info.cache2_entries, + DEBUG(("cache2 entries %d size %d", self->client_info.cache2_entries, self->client_info.cache2_size)); - DEBUG(("cache3 entries %d size %d\r\n", self->client_info.cache3_entries, + DEBUG(("cache3 entries %d size %d", self->client_info.cache3_entries, self->client_info.cache3_size)); return 0; } @@ -564,11 +564,11 @@ xrdp_process_capset_bmpcache2(struct xrdp_rdp* self, struct stream* s, i = MIN(i, 2000); self->client_info.cache3_entries = i; self->client_info.cache3_size = 4096 * Bpp; - DEBUG(("cache1 entries %d size %d\r\n", self->client_info.cache1_entries, + DEBUG(("cache1 entries %d size %d", self->client_info.cache1_entries, self->client_info.cache1_size)); - DEBUG(("cache2 entries %d size %d\r\n", self->client_info.cache2_entries, + DEBUG(("cache2 entries %d size %d", self->client_info.cache2_entries, self->client_info.cache2_size)); - DEBUG(("cache3 entries %d size %d\r\n", self->client_info.cache3_entries, + DEBUG(("cache3 entries %d size %d", self->client_info.cache3_entries, self->client_info.cache3_size)); return 0; } @@ -600,7 +600,7 @@ xrdp_rdp_process_confirm_active(struct xrdp_rdp* self, struct stream* s) int len; char* p; - DEBUG(("in xrdp_rdp_process_confirm_active\r\n")); + DEBUG(("in xrdp_rdp_process_confirm_active")); in_uint8s(s, 4); /* rdp_shareid */ in_uint8s(s, 2); /* userid */ in_uint16_le(s, source_len); /* sizeof RDP_SOURCE */ @@ -616,71 +616,71 @@ xrdp_rdp_process_confirm_active(struct xrdp_rdp* self, struct stream* s) switch (type) { case RDP_CAPSET_GENERAL: /* 1 */ - DEBUG(("RDP_CAPSET_GENERAL\r\n")); + DEBUG(("RDP_CAPSET_GENERAL")); xrdp_process_capset_general(self, s, len); break; case RDP_CAPSET_BITMAP: /* 2 */ - DEBUG(("RDP_CAPSET_BITMAP\r\n")); + DEBUG(("RDP_CAPSET_BITMAP")); break; case RDP_CAPSET_ORDER: /* 3 */ - DEBUG(("RDP_CAPSET_ORDER\r\n")); + DEBUG(("RDP_CAPSET_ORDER")); xrdp_process_capset_order(self, s, len); break; case RDP_CAPSET_BMPCACHE: /* 4 */ - DEBUG(("RDP_CAPSET_BMPCACHE\r\n")); + DEBUG(("RDP_CAPSET_BMPCACHE")); xrdp_process_capset_bmpcache(self, s, len); break; case RDP_CAPSET_CONTROL: /* 5 */ - DEBUG(("RDP_CAPSET_CONTROL\r\n")); + DEBUG(("RDP_CAPSET_CONTROL")); break; case RDP_CAPSET_ACTIVATE: /* 7 */ - DEBUG(("RDP_CAPSET_ACTIVATE\r\n")); + DEBUG(("RDP_CAPSET_ACTIVATE")); break; case RDP_CAPSET_POINTER: /* 8 */ - DEBUG(("RDP_CAPSET_POINTER\r\n")); + DEBUG(("RDP_CAPSET_POINTER")); xrdp_process_capset_pointercache(self, s, len); break; case RDP_CAPSET_SHARE: /* 9 */ - DEBUG(("RDP_CAPSET_SHARE\r\n")); + DEBUG(("RDP_CAPSET_SHARE")); break; case RDP_CAPSET_COLCACHE: /* 10 */ - DEBUG(("RDP_CAPSET_COLCACHE\r\n")); + DEBUG(("RDP_CAPSET_COLCACHE")); break; case 12: /* 12 */ - DEBUG(("--12\r\n")); + DEBUG(("--12")); break; case 13: /* 13 */ - DEBUG(("--13\r\n")); + DEBUG(("--13")); break; case 14: /* 14 */ - DEBUG(("--14\r\n")); + DEBUG(("--14")); break; case 15: /* 15 */ - DEBUG(("--15\r\n")); + DEBUG(("--15")); break; case 16: /* 16 */ - DEBUG(("--16\r\n")); + DEBUG(("--16")); break; case 17: /* 17 */ - DEBUG(("--16\r\n")); + DEBUG(("--16")); break; case RDP_CAPSET_BMPCACHE2: /* 19 */ - DEBUG(("RDP_CAPSET_BMPCACHE2\r\n")); + DEBUG(("RDP_CAPSET_BMPCACHE2")); xrdp_process_capset_bmpcache2(self, s, len); break; case 20: /* 20 */ - DEBUG(("--20\r\n")); + DEBUG(("--20")); break; case 21: /* 21 */ - DEBUG(("--21\r\n")); + DEBUG(("--21")); break; default: - g_printf("unknown in xrdp_rdp_process_confirm_active %d\r\n", type); + g_writeln("unknown in xrdp_rdp_process_confirm_active %d", type); break; } s->p = p + len; } - DEBUG(("out xrdp_rdp_process_confirm_active\r\n")); + DEBUG(("out xrdp_rdp_process_confirm_active")); return 0; } @@ -706,7 +706,7 @@ xrdp_rdp_process_data_input(struct xrdp_rdp* self, struct stream* s) in_uint16_le(s, num_events); in_uint8s(s, 2); /* pad */ - DEBUG(("in xrdp_rdp_process_data_input %d events\r\n", num_events)); + DEBUG(("in xrdp_rdp_process_data_input %d events", num_events)); for (index = 0; index < num_events; index++) { in_uint32_le(s, time); @@ -715,7 +715,7 @@ xrdp_rdp_process_data_input(struct xrdp_rdp* self, struct stream* s) in_sint16_le(s, param1); in_sint16_le(s, param2); DEBUG(("xrdp_rdp_process_data_input event %4.4x flags %4.4x param1 %d \ -param2 %d time %d\r\n", msg_type, device_flags, param1, param2, time)); +param2 %d time %d", msg_type, device_flags, param1, param2, time)); if (self->session->callback != 0) { /* msg_type can be @@ -727,7 +727,7 @@ param2 %d time %d\r\n", msg_type, device_flags, param1, param2, time)); device_flags, time); } } - DEBUG(("out xrdp_rdp_process_data_input\r\n")); + DEBUG(("out xrdp_rdp_process_data_input")); return 0; } @@ -942,7 +942,7 @@ xrdp_rdp_process_data(struct xrdp_rdp* self, struct stream* s) in_uint8(s, data_type); in_uint8(s, ctype); in_uint16_le(s, clen); - DEBUG(("xrdp_rdp_process_data code %d\r\n", data_type)); + DEBUG(("xrdp_rdp_process_data code %d", data_type)); switch (data_type) { case RDP_DATA_PDU_POINTER: /* 27 */ @@ -976,7 +976,7 @@ xrdp_rdp_process_data(struct xrdp_rdp* self, struct stream* s) xrdp_rdp_process_data_font(self, s); break; default: - g_printf("unknown in xrdp_rdp_process_data %d\r\n", data_type); + g_writeln("unknown in xrdp_rdp_process_data %d", data_type); break; } return 0; diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c index 3656af6d..f894e5fb 100644 --- a/libxrdp/xrdp_sec.c +++ b/libxrdp/xrdp_sec.c @@ -392,7 +392,7 @@ xrdp_sec_process_logon_info(struct xrdp_sec* self, struct stream* s) //g_hexdump(s->p, 100); in_uint8s(s, 4); in_uint32_le(s, flags); - DEBUG(("in xrdp_sec_process_logon_info flags $%x\r\n", flags)); + DEBUG(("in xrdp_sec_process_logon_info flags $%x", flags)); /* this is the first test that the decrypt is working */ if ((flags & RDP_LOGON_NORMAL) != RDP_LOGON_NORMAL) /* 0x33 */ { /* must be or error */ @@ -583,14 +583,14 @@ xrdp_sec_recv(struct xrdp_sec* self, struct stream* s, int* chan) int flags; int len; - DEBUG((" in xrdp_sec_recv\r\n")); + DEBUG((" in xrdp_sec_recv")); if (xrdp_mcs_recv(self->mcs_layer, s, chan) != 0) { - DEBUG((" out xrdp_sec_recv error\r\n")); + DEBUG((" out xrdp_sec_recv error")); return 1; } in_uint32_le(s, flags); - DEBUG((" in xrdp_sec_recv flags $%x\r\n", flags)); + DEBUG((" in xrdp_sec_recv flags $%x", flags)); if (flags & SEC_ENCRYPT) /* 0x08 */ { in_uint8s(s, 8); /* signature */ @@ -604,36 +604,36 @@ xrdp_sec_recv(struct xrdp_sec* self, struct stream* s, int* chan) self->pub_mod, self->pri_exp); xrdp_sec_establish_keys(self); *chan = 1; /* just set a non existing channel and exit */ - DEBUG((" out xrdp_sec_recv\r\n")); + DEBUG((" out xrdp_sec_recv")); return 0; } if (flags & SEC_LOGON_INFO) /* 0x40 */ { if (xrdp_sec_process_logon_info(self, s) != 0) { - DEBUG((" out xrdp_sec_recv error\r\n")); + DEBUG((" out xrdp_sec_recv error")); return 1; } if (xrdp_sec_send_lic_initial(self) != 0) { - DEBUG((" out xrdp_sec_recv error\r\n")); + DEBUG((" out xrdp_sec_recv error")); return 1; } *chan = 1; /* just set a non existing channel and exit */ - DEBUG((" out xrdp_sec_recv\r\n")); + DEBUG((" out xrdp_sec_recv")); return 0; } if (flags & SEC_LICENCE_NEG) /* 0x80 */ { if (xrdp_sec_send_lic_response(self) != 0) { - DEBUG((" out xrdp_sec_recv error\r\n")); + DEBUG((" out xrdp_sec_recv error")); return 1; } - DEBUG((" out xrdp_sec_recv\r\n")); + DEBUG((" out xrdp_sec_recv")); return -1; /* special error that means send demand active */ } - DEBUG((" out xrdp_sec_recv\r\n")); + DEBUG((" out xrdp_sec_recv")); return 0; } @@ -686,7 +686,7 @@ xrdp_sec_send(struct xrdp_sec* self, struct stream* s) { int datalen; - DEBUG((" in xrdp_sec_send\r\n")); + DEBUG((" in xrdp_sec_send")); s_pop_layer(s, sec_hdr); if (self->crypt_level > 1) { @@ -703,7 +703,7 @@ xrdp_sec_send(struct xrdp_sec* self, struct stream* s) { return 1; } - DEBUG((" out xrdp_sec_send\r\n")); + DEBUG((" out xrdp_sec_send")); return 0; } @@ -817,21 +817,21 @@ xrdp_sec_in_mcs_data(struct xrdp_sec* self) int APP_CC xrdp_sec_incoming(struct xrdp_sec* self) { - DEBUG(("in xrdp_sec_incoming\r\n")); + DEBUG(("in xrdp_sec_incoming")); xrdp_sec_out_mcs_data(self); if (xrdp_mcs_incoming(self->mcs_layer) != 0) { return 1; } #ifdef XRDP_DEBUG - g_printf("client mcs data received\r\n"); + g_writeln("client mcs data received"); g_hexdump(self->client_mcs_data.data, self->client_mcs_data.end - self->client_mcs_data.data); - g_printf("server mcs data sent\r\n"); + g_writeln("server mcs data sent"); g_hexdump(self->server_mcs_data.data, self->server_mcs_data.end - self->server_mcs_data.data); #endif - DEBUG(("out xrdp_sec_incoming\r\n")); + DEBUG(("out xrdp_sec_incoming")); xrdp_sec_in_mcs_data(self); return 0; } diff --git a/libxrdp/xrdp_tcp.c b/libxrdp/xrdp_tcp.c index 7908246b..c3629a46 100644 --- a/libxrdp/xrdp_tcp.c +++ b/libxrdp/xrdp_tcp.c @@ -60,10 +60,10 @@ xrdp_tcp_recv(struct xrdp_tcp* self, struct stream* s, int len) if (self->sck_closed) { - DEBUG((" in xrdp_tcp_recv, sck closed\r\n")); + DEBUG((" in xrdp_tcp_recv, sck closed")); return 1; } - DEBUG((" in xrdp_tcp_recv, gota get %d bytes\r\n", len)); + DEBUG((" in xrdp_tcp_recv, gota get %d bytes", len)); init_stream(s, len); while (len > 0) { @@ -77,14 +77,14 @@ xrdp_tcp_recv(struct xrdp_tcp* self, struct stream* s, int len) else { self->sck_closed = 1; - DEBUG((" error = -1 in xrdp_tcp_recv socket %d\r\n", self->sck)); + DEBUG((" error = -1 in xrdp_tcp_recv socket %d", self->sck)); return 1; } } else if (rcvd == 0) { self->sck_closed = 1; - DEBUG((" error = 0 in xrdp_tcp_recv socket %d\r\n", self->sck)); + DEBUG((" error = 0 in xrdp_tcp_recv socket %d", self->sck)); return 1; } else @@ -93,7 +93,7 @@ xrdp_tcp_recv(struct xrdp_tcp* self, struct stream* s, int len) len -= rcvd; } } - DEBUG((" out xrdp_tcp_recv\r\n")); + DEBUG((" out xrdp_tcp_recv")); return 0; } @@ -108,11 +108,11 @@ xrdp_tcp_send(struct xrdp_tcp* self, struct stream* s) if (self->sck_closed) { - DEBUG((" in xrdp_tcp_send, sck closed\r\n")); + DEBUG((" in xrdp_tcp_send, sck closed")); return 1; } len = s->end - s->data; - DEBUG((" in xrdp_tcp_send, gota send %d bytes\r\n", len)); + DEBUG((" in xrdp_tcp_send, gota send %d bytes", len)); total = 0; while (total < len) { @@ -126,14 +126,14 @@ xrdp_tcp_send(struct xrdp_tcp* self, struct stream* s) else { self->sck_closed = 1; - DEBUG((" error = -1 in xrdp_tcp_send socket %d\r\n", self->sck)); + DEBUG((" error = -1 in xrdp_tcp_send socket %d", self->sck)); return 1; } } else if (sent == 0) { self->sck_closed = 1; - DEBUG((" error = 0 in xrdp_tcp_send socket %d\r\n", self->sck)); + DEBUG((" error = 0 in xrdp_tcp_send socket %d", self->sck)); return 1; } else @@ -141,6 +141,6 @@ xrdp_tcp_send(struct xrdp_tcp* self, struct stream* s) total = total + sent; } } - DEBUG((" out xrdp_tcp_send, sent %d bytes ok\r\n", len)); + DEBUG((" out xrdp_tcp_send, sent %d bytes ok", len)); return 0; } |