diff options
author | jsorg71 <jsorg71> | 2005-11-26 01:38:08 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2005-11-26 01:38:08 +0000 |
commit | 754efcabb167f162133ac0963dd0552f09c32bf1 (patch) | |
tree | 9645d9d7d45096cd3824663633156d67a6e35fb9 /libxrdp | |
parent | c22e66e9aec8e9147d3e56d9350a58fea0a40c75 (diff) | |
download | xrdp-proprietary-754efcabb167f162133ac0963dd0552f09c32bf1.tar.gz xrdp-proprietary-754efcabb167f162133ac0963dd0552f09c32bf1.zip |
<lf><cr> should be <cr><lf>
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 | 10 | ||||
-rw-r--r-- | libxrdp/xrdp_rdp.c | 38 | ||||
-rw-r--r-- | libxrdp/xrdp_sec.c | 24 | ||||
-rw-r--r-- | libxrdp/xrdp_tcp.c | 20 |
7 files changed, 68 insertions, 70 deletions
diff --git a/libxrdp/libxrdp.c b/libxrdp/libxrdp.c index c7af956e..cfcdfeaa 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\n\r", code)); + DEBUG(("libxrdp_process_data code %d\r\n", 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\n\r")); + DEBUG(("libxrdp_process_data returned non zero\r\n")); cont = 0; session->term = 1; } break; default: - g_printf("unknown in libxrdp_process_data\n\r"); + g_printf("unknown in libxrdp_process_data\r\n"); 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\n\r", j); + g_printf("error, decompressed size too big, its %d\r\n", j); } if (bufsize > 8192) { - g_printf("error, compressed size too big, its %d\n\r", bufsize); + g_printf("error, compressed size too big, its %d\r\n", 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\n\r", + g_printf("error, total compressed size too big, its %d\r\n", total_bufsize); } } diff --git a/libxrdp/xrdp_iso.c b/libxrdp/xrdp_iso.c index 7cd56bf9..73496596 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\n\r")); + DEBUG((" in xrdp_iso_recv\r\n")); if (xrdp_iso_recv_msg(self, s, &code) != 0) { - DEBUG((" out xrdp_iso_recv xrdp_iso_recv_msg return non zero\n\r")); + DEBUG((" out xrdp_iso_recv xrdp_iso_recv_msg return non zero\r\n")); return 1; } if (code != ISO_PDU_DT) { - DEBUG((" out xrdp_iso_recv code != ISO_PDU_DT\n\r")); + DEBUG((" out xrdp_iso_recv code != ISO_PDU_DT\r\n")); return 1; } - DEBUG((" out xrdp_iso_recv\n\r")); + DEBUG((" out xrdp_iso_recv\r\n")); 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\n\r")); + DEBUG((" in xrdp_iso_incoming\r\n")); 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\n\r")); + DEBUG((" out xrdp_iso_incoming\r\n")); 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\n\r")); + DEBUG((" in xrdp_iso_send\r\n")); 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\n\r")); + DEBUG((" out xrdp_iso_send\r\n")); return 0; } diff --git a/libxrdp/xrdp_mcs.c b/libxrdp/xrdp_mcs.c index 3fed1a0b..3900d345 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\n\r")); + DEBUG((" in xrdp_mcs_recv\r\n")); while (1) { if (xrdp_iso_recv(self->iso_layer, s) != 0) { - DEBUG((" out xrdp_mcs_recv xrdp_iso_recv returned non zero\n\r")); + DEBUG((" out xrdp_mcs_recv xrdp_iso_recv returned non zero\r\n")); return 1; } in_uint8(s, opcode); appid = opcode >> 2; if (appid == MCS_DPUM) { - DEBUG((" out xrdp_mcs_recv appid != MCS_DPUM\n\r")); + DEBUG((" out xrdp_mcs_recv appid != MCS_DPUM\r\n")); 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\n\r", appid)); + DEBUG((" out xrdp_mcs_recv err got 0x%x need MCS_SDRQ\r\n", 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\n\r")); + DEBUG((" out xrdp_mcs_recv\r\n")); 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\n\r")); + DEBUG((" in xrdp_mcs_incoming\r\n")); 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\n\r")); + DEBUG((" out xrdp_mcs_incoming\r\n")); return 0; } @@ -585,7 +585,7 @@ xrdp_mcs_send(struct xrdp_mcs* self, struct stream* s) { int len; - DEBUG((" in xrdp_mcs_send\n\r")); + DEBUG((" in xrdp_mcs_send\r\n")); 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\n\r")); + DEBUG((" out xrdp_mcs_send\r\n")); return 0; } diff --git a/libxrdp/xrdp_orders.c b/libxrdp/xrdp_orders.c index 66ccae7c..42164152 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\n\r", self->order_count)); + DEBUG(("xrdp_orders_send sending %d orders\r\n", 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_count > 0 && self->order_count > 0) { s_mark_end(self->out_s); - DEBUG(("xrdp_orders_force_send sending %d orders\n\r", self->order_count)); + DEBUG(("xrdp_orders_force_send sending %d orders\r\n", 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, @@ -1550,12 +1550,12 @@ xrdp_orders_send_bitmap(struct xrdp_orders* self, if (width > 64) { - g_printf("error, width > 64\n\r"); + g_printf("error, width > 64\r\n"); return 1; } if (height > 64) { - g_printf("error, height > 64\n\r"); + g_printf("error, height > 64\r\n"); return 1; } e = width % 4; @@ -1576,7 +1576,7 @@ 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)\n\r", lines_sending, height); +height(%d)\r\n", lines_sending, height); return 1; } bufsize = s->p - p; diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c index 48bc2860..a1d5df6b 100644 --- a/libxrdp/xrdp_rdp.c +++ b/libxrdp/xrdp_rdp.c @@ -156,7 +156,7 @@ xrdp_rdp_recv(struct xrdp_rdp* self, struct stream* s, int* code) int pdu_code; int chan; - DEBUG(("in xrdp_rdp_recv\n\r")); + DEBUG(("in xrdp_rdp_recv\r\n")); if (s->next_packet == 0 || s->next_packet >= s->end) { chan = 0; @@ -165,19 +165,19 @@ xrdp_rdp_recv(struct xrdp_rdp* self, struct stream* s, int* code) { s->next_packet = 0; *code = -1; - DEBUG(("out xrdp_rdp_recv\n\r")); + DEBUG(("out xrdp_rdp_recv\r\n")); return 0; } if (error != 0) { - DEBUG(("out xrdp_rdp_recv error\n\r")); + DEBUG(("out xrdp_rdp_recv error\r\n")); return 1; } if (chan != MCS_GLOBAL_CHANNEL && chan > 0) { s->next_packet = 0; *code = 0; - DEBUG(("out xrdp_rdp_recv\n\r")); + DEBUG(("out xrdp_rdp_recv\r\n")); return 0; } s->next_packet = s->p; @@ -191,14 +191,14 @@ xrdp_rdp_recv(struct xrdp_rdp* self, struct stream* s, int* code) { s->next_packet += 8; *code = 0; - DEBUG(("out xrdp_rdp_recv\n\r")); + DEBUG(("out xrdp_rdp_recv\r\n")); 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\n\r")); + DEBUG(("out xrdp_rdp_recv\r\n")); return 0; } @@ -208,7 +208,7 @@ xrdp_rdp_send(struct xrdp_rdp* self, struct stream* s, int pdu_type) { int len; - DEBUG(("in xrdp_rdp_send\n\r")); + DEBUG(("in xrdp_rdp_send\r\n")); s_pop_layer(s, rdp_hdr); len = s->end - s->p; out_uint16_le(s, len); @@ -216,10 +216,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) != 0) { - DEBUG(("out xrdp_rdp_send error\n\r")); + DEBUG(("out xrdp_rdp_send error\r\n")); return 1; } - DEBUG(("out xrdp_rdp_send\n\r")); + DEBUG(("out xrdp_rdp_send\r\n")); return 0; } @@ -230,7 +230,7 @@ xrdp_rdp_send_data(struct xrdp_rdp* self, struct stream* s, { int len; - DEBUG(("in xrdp_rdp_send_data\n\r")); + DEBUG(("in xrdp_rdp_send_data\r\n")); s_pop_layer(s, rdp_hdr); len = s->end - s->p; out_uint16_le(s, len); @@ -245,10 +245,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) != 0) { - DEBUG(("out xrdp_rdp_send_data error\n\r")); + DEBUG(("out xrdp_rdp_send_data error\r\n")); return 1; } - DEBUG(("out xrdp_rdp_send_data\n\r")); + DEBUG(("out xrdp_rdp_send_data\r\n")); return 0; } @@ -288,7 +288,7 @@ xrdp_rdp_parse_client_mcs_data(struct xrdp_rdp* self) break; } p->p = p->data; - DEBUG(("client width %d, client height %d bpp %d\n\r", + DEBUG(("client width %d, client height %d bpp %d\r\n", self->client_info.width, self->client_info.height, self->client_info.bpp)); return 0; @@ -298,7 +298,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\n\r")); + DEBUG(("in xrdp_rdp_incoming\r\n")); if (xrdp_sec_incoming(self->sec_layer) != 0) { return 1; @@ -306,7 +306,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\n\r", self->mcs_channel)); + DEBUG(("out xrdp_rdp_incoming mcs channel %d\r\n", self->mcs_channel)); return 0; } @@ -579,7 +579,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(("xrdp_rdp_process_data_input %d events\n\r", num_events)); + DEBUG(("xrdp_rdp_process_data_input %d events\r\n", num_events)); for (index = 0; index < num_events; index++) { in_uint32_le(s, time); @@ -588,7 +588,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\n\r", msg_type, device_flags, param1, param2, time)); +param2 %d time %d\r\n", msg_type, device_flags, param1, param2, time)); if (self->session->callback != 0) { /* msg_type can be @@ -813,7 +813,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\n\r", data_type)); + DEBUG(("xrdp_rdp_process_data code %d\r\n", data_type)); switch (data_type) { case RDP_DATA_PDU_POINTER: /* 27 */ @@ -847,7 +847,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\n\r", data_type); + g_printf("unknown in xrdp_rdp_process_data %d\r\n", data_type); break; } return 0; diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c index 243e84a2..1b44751c 100644 --- a/libxrdp/xrdp_sec.c +++ b/libxrdp/xrdp_sec.c @@ -353,7 +353,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\n\r", flags)); + DEBUG(("in xrdp_sec_process_logon_info flags $%x\r\n", flags)); /* this is the first test that the decrypt is working */ if ((flags & RDP_LOGON_NORMAL) != RDP_LOGON_NORMAL) /* 0x33 */ { /* must be or error */ @@ -544,14 +544,14 @@ xrdp_sec_recv(struct xrdp_sec* self, struct stream* s, int* chan) int flags; int len; - DEBUG((" in xrdp_sec_recv\n\r")); + DEBUG((" in xrdp_sec_recv\r\n")); if (xrdp_mcs_recv(self->mcs_layer, s, chan) != 0) { - DEBUG((" out xrdp_sec_recv error\n\r")); + DEBUG((" out xrdp_sec_recv error\r\n")); return 1; } in_uint32_le(s, flags); - DEBUG((" in xrdp_sec_recv flags $%x\n\r", flags)); + DEBUG((" in xrdp_sec_recv flags $%x\r\n", flags)); if (flags & SEC_ENCRYPT) /* 0x08 */ { in_uint8s(s, 8); /* signature */ @@ -588,7 +588,7 @@ xrdp_sec_recv(struct xrdp_sec* self, struct stream* s, int* chan) } return -1; /* special error that means send demand active */ } - DEBUG((" out xrdp_sec_recv error\n\r")); + DEBUG((" out xrdp_sec_recv error\r\n")); return 0; } @@ -598,14 +598,14 @@ xrdp_sec_recv(struct xrdp_sec* self, struct stream* s, int* chan) int APP_CC xrdp_sec_send(struct xrdp_sec* self, struct stream* s, int flags) { - DEBUG((" in xrdp_sec_send\n\r")); + DEBUG((" in xrdp_sec_send\r\n")); s_pop_layer(s, sec_hdr); out_uint32_le(s, flags); if (xrdp_mcs_send(self->mcs_layer, s) != 0) { return 1; } - DEBUG((" out xrdp_sec_send\n\r")); + DEBUG((" out xrdp_sec_send\r\n")); return 0; } @@ -711,8 +711,6 @@ xrdp_sec_in_mcs_data(struct xrdp_sec* self) s->p = s->data; in_uint8s(s, 39); in_uint32_le(s, client_info->keylayout); -// g_printf("%s %d %x\n", client_info->hostname, client_info->build, -// client_info->keylayout); s->p = s->data; } @@ -720,21 +718,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\n\r")); + DEBUG(("in xrdp_sec_incoming\r\n")); 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\n\r"); + g_printf("client mcs data received\r\n"); g_hexdump(self->client_mcs_data.data, self->client_mcs_data.end - self->client_mcs_data.data); - g_printf("server mcs data sent\n\r"); + g_printf("server mcs data sent\r\n"); g_hexdump(self->server_mcs_data.data, self->server_mcs_data.end - self->server_mcs_data.data); #endif - DEBUG(("out xrdp_sec_incoming\n\r")); + DEBUG(("out xrdp_sec_incoming\r\n")); xrdp_sec_in_mcs_data(self); return 0; } diff --git a/libxrdp/xrdp_tcp.c b/libxrdp/xrdp_tcp.c index 59d4a615..fa1225b4 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\n\r")); + DEBUG((" in xrdp_tcp_recv, sck closed\r\n")); return 1; } - DEBUG((" in xrdp_tcp_recv, gota get %d bytes\n\r", len)); + DEBUG((" in xrdp_tcp_recv, gota get %d bytes\r\n", 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\n\r", self->sck)); + DEBUG((" error = -1 in xrdp_tcp_recv socket %d\r\n", self->sck)); return 1; } } else if (rcvd == 0) { self->sck_closed = 1; - DEBUG((" error = 0 in xrdp_tcp_recv socket %d\n\r", self->sck)); + DEBUG((" error = 0 in xrdp_tcp_recv socket %d\r\n", 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\n\r")); + DEBUG((" out xrdp_tcp_recv\r\n")); 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\n\r")); + DEBUG((" in xrdp_tcp_send, sck closed\r\n")); return 1; } len = s->end - s->data; - DEBUG((" in xrdp_tcp_send, gota send %d bytes\n\r", len)); + DEBUG((" in xrdp_tcp_send, gota send %d bytes\r\n", 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\n\r", self->sck)); + DEBUG((" error = -1 in xrdp_tcp_send socket %d\r\n", self->sck)); return 1; } } else if (sent == 0) { self->sck_closed = 1; - DEBUG((" error = 0 in xrdp_tcp_send socket %d\n\r", self->sck)); + DEBUG((" error = 0 in xrdp_tcp_send socket %d\r\n", 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\n\r", len)); + DEBUG((" out xrdp_tcp_send, sent %d bytes ok\r\n", len)); return 0; } |