<lf><cr> should be <cr><lf>
This commit is contained in:
parent
c22e66e9ae
commit
754efcabb1
@ -133,7 +133,7 @@ g_hexdump(char* p, int len)
|
||||
{
|
||||
g_printf("%c", (line[i] >= 0x20 && line[i] < 0x7f) ? line[i] : '.');
|
||||
}
|
||||
g_printf("\n\r");
|
||||
g_printf("\r\n");
|
||||
offset += thisline;
|
||||
line += thisline;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -48,10 +48,10 @@ main(int argc, char** argv)
|
||||
|
||||
if (0 != config_read(&g_cfg))
|
||||
{
|
||||
g_printf("sesrun: error reading config. quitting.\n\r");
|
||||
g_printf("sesrun: error reading config. quitting.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
g_pid = g_getpid();
|
||||
if (argc == 1)
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ verify_pam_conv(int num_msg, const struct pam_message** msg,
|
||||
reply[i].resp_retcode = PAM_SUCCESS;
|
||||
break;
|
||||
default:
|
||||
g_printf("unknown in verify_pam_conv\n\r");
|
||||
g_printf("unknown in verify_pam_conv\r\n");
|
||||
g_free(reply);
|
||||
return PAM_CONV_ERR;
|
||||
}
|
||||
@ -107,14 +107,14 @@ auth_userpass(char* user, char* pass)
|
||||
error = pam_start(service_name, 0, &(auth_info->pamc), &(auth_info->ph));
|
||||
if (error != PAM_SUCCESS)
|
||||
{
|
||||
g_printf("pam_start failed: %s\n\r", pam_strerror(auth_info->ph, error));
|
||||
g_printf("pam_start failed: %s\r\n", pam_strerror(auth_info->ph, error));
|
||||
g_free(auth_info);
|
||||
return 0;
|
||||
}
|
||||
error = pam_authenticate(auth_info->ph, 0);
|
||||
if (error != PAM_SUCCESS)
|
||||
{
|
||||
g_printf("pam_authenticate failed: %s\n\r",
|
||||
g_printf("pam_authenticate failed: %s\r\n",
|
||||
pam_strerror(auth_info->ph, error));
|
||||
g_free(auth_info);
|
||||
return 0;
|
||||
@ -122,7 +122,7 @@ auth_userpass(char* user, char* pass)
|
||||
error = pam_acct_mgmt(auth_info->ph, 0);
|
||||
if (error != PAM_SUCCESS)
|
||||
{
|
||||
g_printf("pam_acct_mgmt failed: %s\n\r",
|
||||
g_printf("pam_acct_mgmt failed: %s\r\n",
|
||||
pam_strerror(auth_info->ph, error));
|
||||
g_free(auth_info);
|
||||
return 0;
|
||||
@ -144,20 +144,20 @@ auth_start_session(long in_val, int in_display)
|
||||
error = pam_set_item(auth_info->ph, PAM_TTY, display);
|
||||
if (error != PAM_SUCCESS)
|
||||
{
|
||||
g_printf("pam_set_item failed: %s\n\r", pam_strerror(auth_info->ph, error));
|
||||
g_printf("pam_set_item failed: %s\r\n", pam_strerror(auth_info->ph, error));
|
||||
return 1;
|
||||
}
|
||||
error = pam_setcred(auth_info->ph, PAM_ESTABLISH_CRED);
|
||||
if (error != PAM_SUCCESS)
|
||||
{
|
||||
g_printf("pam_setcred failed: %s\n\r", pam_strerror(auth_info->ph, error));
|
||||
g_printf("pam_setcred failed: %s\r\n", pam_strerror(auth_info->ph, error));
|
||||
return 1;
|
||||
}
|
||||
auth_info->did_setcred = 1;
|
||||
error = pam_open_session(auth_info->ph, 0);
|
||||
if (error != PAM_SUCCESS)
|
||||
{
|
||||
g_printf("pam_open_session failed: %s\n\r",
|
||||
g_printf("pam_open_session failed: %s\r\n",
|
||||
pam_strerror(auth_info->ph, error));
|
||||
return 1;
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ lib_mod_event(struct vnc* v, int msg, long param1, long param2,
|
||||
break;
|
||||
default:
|
||||
g_printf("unkown key lib_mod_event msg %d \
|
||||
param1 0x%4.4x param2 0x%4.4x\n\r", msg, param1, param2);
|
||||
param1 0x%4.4x param2 0x%4.4x\r\n", msg, param1, param2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -580,7 +580,7 @@ lib_framebuffer_update(struct vnc* v)
|
||||
}
|
||||
else
|
||||
{
|
||||
g_printf("error in lib_framebuffer_update\n\r");
|
||||
g_printf("error in lib_framebuffer_update\r\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -701,7 +701,7 @@ lib_mod_signal(struct vnc* v)
|
||||
}
|
||||
else
|
||||
{
|
||||
g_printf("unknown in lib_mod_signal %d\n\r", type);
|
||||
g_printf("unknown in lib_mod_signal %d\r\n", type);
|
||||
}
|
||||
}
|
||||
return error;
|
||||
|
@ -154,7 +154,7 @@ xrdp_cache_add_bitmap(struct xrdp_cache* self, struct xrdp_bitmap* bitmap)
|
||||
#endif
|
||||
{
|
||||
self->bitmap_items[i][j].stamp = self->bitmap_stamp;
|
||||
DEBUG(("found bitmap at %d %d\n\r", i, j));
|
||||
DEBUG(("found bitmap at %d %d\r\n", i, j));
|
||||
xrdp_bitmap_delete(bitmap);
|
||||
return MAKELONG(j, i);
|
||||
}
|
||||
@ -172,7 +172,7 @@ xrdp_cache_add_bitmap(struct xrdp_cache* self, struct xrdp_bitmap* bitmap)
|
||||
#endif
|
||||
{
|
||||
self->bitmap_items[i][j].stamp = self->bitmap_stamp;
|
||||
DEBUG(("found bitmap at %d %d\n\r", i, j));
|
||||
DEBUG(("found bitmap at %d %d\r\n", i, j));
|
||||
xrdp_bitmap_delete(bitmap);
|
||||
return MAKELONG(j, i);
|
||||
}
|
||||
@ -190,7 +190,7 @@ xrdp_cache_add_bitmap(struct xrdp_cache* self, struct xrdp_bitmap* bitmap)
|
||||
#endif
|
||||
{
|
||||
self->bitmap_items[i][j].stamp = self->bitmap_stamp;
|
||||
DEBUG(("found bitmap at %d %d\n\r", i, j));
|
||||
DEBUG(("found bitmap at %d %d\r\n", i, j));
|
||||
xrdp_bitmap_delete(bitmap);
|
||||
return MAKELONG(j, i);
|
||||
}
|
||||
@ -198,7 +198,7 @@ xrdp_cache_add_bitmap(struct xrdp_cache* self, struct xrdp_bitmap* bitmap)
|
||||
}
|
||||
else
|
||||
{
|
||||
g_printf("error in xrdp_cache_add_bitmap, too big(%d)\n\r", bmp_size);
|
||||
g_printf("error in xrdp_cache_add_bitmap, too big(%d)\r\n", bmp_size);
|
||||
}
|
||||
/* look for oldest */
|
||||
cache_id = 0;
|
||||
@ -243,7 +243,7 @@ xrdp_cache_add_bitmap(struct xrdp_cache* self, struct xrdp_bitmap* bitmap)
|
||||
}
|
||||
}
|
||||
}
|
||||
DEBUG(("adding bitmap at %d %d\n\r", cache_id, cache_idx));
|
||||
DEBUG(("adding bitmap at %d %d\r\n", cache_id, cache_idx));
|
||||
/* set, send bitmap and return */
|
||||
xrdp_bitmap_delete(self->bitmap_items[cache_id][cache_idx].bitmap);
|
||||
self->bitmap_items[cache_id][cache_idx].bitmap = bitmap;
|
||||
@ -336,7 +336,7 @@ xrdp_cache_add_char(struct xrdp_cache* self,
|
||||
if (xrdp_font_item_compare(&self->char_items[i][j].font_item, font_item))
|
||||
{
|
||||
self->char_items[i][j].stamp = self->char_stamp;
|
||||
DEBUG(("found font at %d %d\n\r", i, j));
|
||||
DEBUG(("found font at %d %d\r\n", i, j));
|
||||
return MAKELONG(j, i);
|
||||
}
|
||||
}
|
||||
@ -357,7 +357,7 @@ xrdp_cache_add_char(struct xrdp_cache* self,
|
||||
}
|
||||
}
|
||||
}
|
||||
DEBUG(("adding char at %d %d\n\r", f, c));
|
||||
DEBUG(("adding char at %d %d\r\n", f, c));
|
||||
/* set, send char and return */
|
||||
fi = &self->char_items[f][c].font_item;
|
||||
g_free(fi->data);
|
||||
@ -404,7 +404,7 @@ xrdp_cache_add_pointer(struct xrdp_cache* self,
|
||||
self->pointer_items[i].stamp = self->pointer_stamp;
|
||||
xrdp_wm_set_pointer(self->wm, i);
|
||||
self->wm->current_pointer = i;
|
||||
DEBUG(("found pointer at %d\n\r", i));
|
||||
DEBUG(("found pointer at %d\r\n", i));
|
||||
return i;
|
||||
}
|
||||
}
|
||||
@ -432,7 +432,7 @@ xrdp_cache_add_pointer(struct xrdp_cache* self,
|
||||
self->pointer_items[index].x,
|
||||
self->pointer_items[index].y);
|
||||
self->wm->current_pointer = index;
|
||||
DEBUG(("adding pointer at %d\n\r", index));
|
||||
DEBUG(("adding pointer at %d\r\n", index));
|
||||
return index;
|
||||
}
|
||||
|
||||
@ -460,6 +460,6 @@ xrdp_cache_add_pointer_static(struct xrdp_cache* self,
|
||||
self->pointer_items[index].x,
|
||||
self->pointer_items[index].y);
|
||||
self->wm->current_pointer = index;
|
||||
DEBUG(("adding pointer at %d\n\r", index));
|
||||
DEBUG(("adding pointer at %d\r\n", index));
|
||||
return index;
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ server_msg(struct xrdp_mod* mod, char* msg, int code)
|
||||
if (code == 1)
|
||||
{
|
||||
g_printf(msg);
|
||||
g_printf("\n\r");
|
||||
g_printf("\r\n");
|
||||
return 0;
|
||||
}
|
||||
wm = (struct xrdp_wm*)mod->wm;
|
||||
|
@ -116,7 +116,7 @@ xrdp_listen_delete_pro(struct xrdp_listen* self, struct xrdp_process* pro)
|
||||
{
|
||||
if (self->process_list[i] == pro)
|
||||
{
|
||||
DEBUG(("process deleted\n\r"));
|
||||
DEBUG(("process deleted\r\n"));
|
||||
xrdp_process_delete(pro);
|
||||
self->process_list[i] = 0;
|
||||
return 0;
|
||||
@ -130,9 +130,9 @@ xrdp_listen_delete_pro(struct xrdp_listen* self, struct xrdp_process* pro)
|
||||
THREAD_RV THREAD_CC
|
||||
xrdp_process_run(void* in_val)
|
||||
{
|
||||
DEBUG(("process started\n\r"));
|
||||
DEBUG(("process started\r\n"));
|
||||
xrdp_process_main_loop(g_process);
|
||||
DEBUG(("process done\n\r"));
|
||||
DEBUG(("process done\r\n"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -149,12 +149,12 @@ xrdp_listen_main_loop(struct xrdp_listen* self)
|
||||
error = g_tcp_bind(self->sck, "3389");
|
||||
if (error != 0)
|
||||
{
|
||||
g_printf("listening on 3390\n\r");
|
||||
g_printf("listening on 3390\r\n");
|
||||
error = g_tcp_bind(self->sck, "3390");
|
||||
}
|
||||
if (error != 0)
|
||||
{
|
||||
g_printf("bind error in xrdp_listen_main_loop\n\r");
|
||||
g_printf("bind error in xrdp_listen_main_loop\r\n");
|
||||
g_tcp_close(self->sck);
|
||||
self->status = -1;
|
||||
return 1;
|
||||
@ -193,7 +193,7 @@ xrdp_listen_main_loop(struct xrdp_listen* self)
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG(("listen error in xrdp_listen_main_loop\n\r"));
|
||||
DEBUG(("listen error in xrdp_listen_main_loop\r\n"));
|
||||
}
|
||||
xrdp_listen_term_processes(self);
|
||||
g_tcp_close(self->sck);
|
||||
|
@ -128,7 +128,7 @@ xrdp_wm_setup_mod1(struct xrdp_wm* self,
|
||||
}
|
||||
if (func == 0)
|
||||
{
|
||||
g_printf("error finding proc mod_init in %s\n\r", mod_data->lib);
|
||||
g_printf("error finding proc mod_init in %s\r\n", mod_data->lib);
|
||||
}
|
||||
self->mod_init = (struct xrdp_mod* (*)(void))func;
|
||||
func = g_get_proc_address(self->mod_handle, "mod_exit");
|
||||
@ -138,7 +138,7 @@ xrdp_wm_setup_mod1(struct xrdp_wm* self,
|
||||
}
|
||||
if (func == 0)
|
||||
{
|
||||
g_printf("error finding proc mod_exit in %s\n\r", mod_data->lib);
|
||||
g_printf("error finding proc mod_exit in %s\r\n", mod_data->lib);
|
||||
}
|
||||
self->mod_exit = (int (*)(struct xrdp_mod*))func;
|
||||
if (self->mod_init != 0 && self->mod_exit != 0)
|
||||
@ -148,7 +148,7 @@ xrdp_wm_setup_mod1(struct xrdp_wm* self,
|
||||
}
|
||||
else
|
||||
{
|
||||
g_printf("error loading %s\n\r", mod_data->lib);
|
||||
g_printf("error loading %s\r\n", mod_data->lib);
|
||||
}
|
||||
if (self->mod != 0)
|
||||
{
|
||||
@ -179,7 +179,7 @@ xrdp_wm_setup_mod1(struct xrdp_wm* self,
|
||||
/* id self->mod is null, there must be a problem */
|
||||
if (self->mod == 0)
|
||||
{
|
||||
DEBUG(("problem loading lib in xrdp_wm_setup_mod1\n\r"));
|
||||
DEBUG(("problem loading lib in xrdp_wm_setup_mod1\r\n"));
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -275,7 +275,7 @@ xrdp_region_subtract_rect(struct xrdp_region* self,
|
||||
}
|
||||
else
|
||||
{
|
||||
g_printf("error in xrdp_region_subtract_rect\n\r");
|
||||
g_printf("error in xrdp_region_subtract_rect\r\n");
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -342,11 +342,11 @@ xrdp_wm_load_static_pointers(struct xrdp_wm* self)
|
||||
{
|
||||
struct xrdp_pointer_item pointer_item;
|
||||
|
||||
DEBUG(("sending cursor\n\r"));
|
||||
DEBUG(("sending cursor\r\n"));
|
||||
xrdp_wm_load_pointer(self, "cursor1.cur", pointer_item.data,
|
||||
pointer_item.mask, &pointer_item.x, &pointer_item.y);
|
||||
xrdp_cache_add_pointer_static(self->cache, &pointer_item, 1);
|
||||
DEBUG(("sending cursor\n\r"));
|
||||
DEBUG(("sending cursor\r\n"));
|
||||
xrdp_wm_load_pointer(self, "cursor0.cur", pointer_item.data,
|
||||
pointer_item.mask, &pointer_item.x, &pointer_item.y);
|
||||
xrdp_cache_add_pointer_static(self->cache, &pointer_item, 0);
|
||||
@ -1175,7 +1175,7 @@ static int APP_CC
|
||||
xrdp_wm_process_input_mouse(struct xrdp_wm* self, int device_flags,
|
||||
int x, int y)
|
||||
{
|
||||
DEBUG(("mouse event flags %4.4x x %d y %d\n\r", device_flags, x, y));
|
||||
DEBUG(("mouse event flags %4.4x x %d y %d\r\n", device_flags, x, y));
|
||||
if (device_flags & MOUSE_FLAG_MOVE) /* 0x0800 */
|
||||
{
|
||||
xrdp_wm_mouse_move(self->pro_layer->wm, x, y);
|
||||
|
Loading…
Reference in New Issue
Block a user