added some debug info
This commit is contained in:
parent
e14366665b
commit
5aad0fc84a
@ -28,9 +28,11 @@ xrdp_iso_create(struct xrdp_mcs* owner, int sck)
|
|||||||
{
|
{
|
||||||
struct xrdp_iso* self;
|
struct xrdp_iso* self;
|
||||||
|
|
||||||
|
DEBUG((" in xrdp_iso_create"));
|
||||||
self = (struct xrdp_iso*)g_malloc(sizeof(struct xrdp_iso), 1);
|
self = (struct xrdp_iso*)g_malloc(sizeof(struct xrdp_iso), 1);
|
||||||
self->mcs_layer = owner;
|
self->mcs_layer = owner;
|
||||||
self->tcp_layer = xrdp_tcp_create(self, sck);
|
self->tcp_layer = xrdp_tcp_create(self, sck);
|
||||||
|
DEBUG((" out xrdp_iso_create"));
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ xrdp_mcs_create(struct xrdp_sec* owner, int sck,
|
|||||||
{
|
{
|
||||||
struct xrdp_mcs* self;
|
struct xrdp_mcs* self;
|
||||||
|
|
||||||
|
DEBUG((" in xrdp_mcs_create"));
|
||||||
self = (struct xrdp_mcs*)g_malloc(sizeof(struct xrdp_mcs), 1);
|
self = (struct xrdp_mcs*)g_malloc(sizeof(struct xrdp_mcs), 1);
|
||||||
self->sec_layer = owner;
|
self->sec_layer = owner;
|
||||||
self->userid = 1;
|
self->userid = 1;
|
||||||
@ -38,6 +39,7 @@ xrdp_mcs_create(struct xrdp_sec* owner, int sck,
|
|||||||
self->server_mcs_data = server_mcs_data;
|
self->server_mcs_data = server_mcs_data;
|
||||||
self->iso_layer = xrdp_iso_create(self, sck);
|
self->iso_layer = xrdp_iso_create(self, sck);
|
||||||
self->channel_list = list_create();
|
self->channel_list = list_create();
|
||||||
|
DEBUG((" out xrdp_mcs_create"));
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,11 +79,13 @@ xrdp_mcs_send_cjcf(struct xrdp_mcs* self, int userid, int chanid)
|
|||||||
{
|
{
|
||||||
struct stream* s;
|
struct stream* s;
|
||||||
|
|
||||||
|
DEBUG((" in xrdp_mcs_send_cjcf"));
|
||||||
make_stream(s);
|
make_stream(s);
|
||||||
init_stream(s, 8192);
|
init_stream(s, 8192);
|
||||||
if (xrdp_iso_init(self->iso_layer, s) != 0)
|
if (xrdp_iso_init(self->iso_layer, s) != 0)
|
||||||
{
|
{
|
||||||
free_stream(s);
|
free_stream(s);
|
||||||
|
DEBUG((" out xrdp_mcs_send_cjcf error"));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
out_uint8(s, (MCS_CJCF << 2) | 2);
|
out_uint8(s, (MCS_CJCF << 2) | 2);
|
||||||
@ -93,9 +97,11 @@ xrdp_mcs_send_cjcf(struct xrdp_mcs* self, int userid, int chanid)
|
|||||||
if (xrdp_iso_send(self->iso_layer, s) != 0)
|
if (xrdp_iso_send(self->iso_layer, s) != 0)
|
||||||
{
|
{
|
||||||
free_stream(s);
|
free_stream(s);
|
||||||
|
DEBUG((" out xrdp_mcs_send_cjcf error"));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
free_stream(s);
|
free_stream(s);
|
||||||
|
DEBUG((" out xrdp_mcs_send_cjcf"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -374,11 +380,13 @@ xrdp_mcs_send_aucf(struct xrdp_mcs* self)
|
|||||||
{
|
{
|
||||||
struct stream* s;
|
struct stream* s;
|
||||||
|
|
||||||
|
DEBUG((" in xrdp_mcs_send_aucf"));
|
||||||
make_stream(s);
|
make_stream(s);
|
||||||
init_stream(s, 8192);
|
init_stream(s, 8192);
|
||||||
if (xrdp_iso_init(self->iso_layer, s) != 0)
|
if (xrdp_iso_init(self->iso_layer, s) != 0)
|
||||||
{
|
{
|
||||||
free_stream(s);
|
free_stream(s);
|
||||||
|
DEBUG((" out xrdp_mcs_send_aucf error"));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
out_uint8(s, ((MCS_AUCF << 2) | 2));
|
out_uint8(s, ((MCS_AUCF << 2) | 2));
|
||||||
@ -388,9 +396,11 @@ xrdp_mcs_send_aucf(struct xrdp_mcs* self)
|
|||||||
if (xrdp_iso_send(self->iso_layer, s) != 0)
|
if (xrdp_iso_send(self->iso_layer, s) != 0)
|
||||||
{
|
{
|
||||||
free_stream(s);
|
free_stream(s);
|
||||||
|
DEBUG((" out xrdp_mcs_send_aucf error"));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
free_stream(s);
|
free_stream(s);
|
||||||
|
DEBUG((" out xrdp_mcs_send_aucf"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -518,6 +528,7 @@ xrdp_mcs_send_connect_response(struct xrdp_mcs* self)
|
|||||||
int data_len;
|
int data_len;
|
||||||
struct stream* s;
|
struct stream* s;
|
||||||
|
|
||||||
|
DEBUG((" in xrdp_mcs_send_connect_response"));
|
||||||
make_stream(s);
|
make_stream(s);
|
||||||
init_stream(s, 8192);
|
init_stream(s, 8192);
|
||||||
data_len = self->server_mcs_data->end - self->server_mcs_data->data;
|
data_len = self->server_mcs_data->end - self->server_mcs_data->data;
|
||||||
@ -535,9 +546,11 @@ xrdp_mcs_send_connect_response(struct xrdp_mcs* self)
|
|||||||
if (xrdp_iso_send(self->iso_layer, s) != 0)
|
if (xrdp_iso_send(self->iso_layer, s) != 0)
|
||||||
{
|
{
|
||||||
free_stream(s);
|
free_stream(s);
|
||||||
|
DEBUG((" out xrdp_mcs_send_connect_response error"));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
free_stream(s);
|
free_stream(s);
|
||||||
|
DEBUG((" out xrdp_mcs_send_connect_response"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -674,6 +687,7 @@ xrdp_mcs_send(struct xrdp_mcs* self, struct stream* s, int chan)
|
|||||||
out_uint16_be(s, len);
|
out_uint16_be(s, len);
|
||||||
if (xrdp_iso_send(self->iso_layer, s) != 0)
|
if (xrdp_iso_send(self->iso_layer, s) != 0)
|
||||||
{
|
{
|
||||||
|
DEBUG((" out xrdp_mcs_send error"));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
/* todo, do we need to call this for every mcs packet,
|
/* todo, do we need to call this for every mcs packet,
|
||||||
@ -693,11 +707,13 @@ xrdp_mcs_disconnect(struct xrdp_mcs* self)
|
|||||||
{
|
{
|
||||||
struct stream* s;
|
struct stream* s;
|
||||||
|
|
||||||
|
DEBUG((" in xrdp_mcs_disconnect"));
|
||||||
make_stream(s);
|
make_stream(s);
|
||||||
init_stream(s, 8192);
|
init_stream(s, 8192);
|
||||||
if (xrdp_iso_init(self->iso_layer, s) != 0)
|
if (xrdp_iso_init(self->iso_layer, s) != 0)
|
||||||
{
|
{
|
||||||
free_stream(s);
|
free_stream(s);
|
||||||
|
DEBUG((" out xrdp_mcs_disconnect error"));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
out_uint8(s, (MCS_DPUM << 2) | 1);
|
out_uint8(s, (MCS_DPUM << 2) | 1);
|
||||||
@ -706,8 +722,10 @@ xrdp_mcs_disconnect(struct xrdp_mcs* self)
|
|||||||
if (xrdp_iso_send(self->iso_layer, s) != 0)
|
if (xrdp_iso_send(self->iso_layer, s) != 0)
|
||||||
{
|
{
|
||||||
free_stream(s);
|
free_stream(s);
|
||||||
|
DEBUG((" out xrdp_mcs_disconnect error"));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
free_stream(s);
|
free_stream(s);
|
||||||
|
DEBUG((" out xrdp_mcs_disconnect"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -116,6 +116,7 @@ xrdp_rdp_create(struct xrdp_session* session, int sck)
|
|||||||
{
|
{
|
||||||
struct xrdp_rdp* self;
|
struct xrdp_rdp* self;
|
||||||
|
|
||||||
|
DEBUG(("in xrdp_rdp_create"));
|
||||||
self = (struct xrdp_rdp*)g_malloc(sizeof(struct xrdp_rdp), 1);
|
self = (struct xrdp_rdp*)g_malloc(sizeof(struct xrdp_rdp), 1);
|
||||||
self->session = session;
|
self->session = session;
|
||||||
self->share_id = 66538;
|
self->share_id = 66538;
|
||||||
@ -131,6 +132,7 @@ xrdp_rdp_create(struct xrdp_session* session, int sck)
|
|||||||
self->client_info.cache2_size = 1024;
|
self->client_info.cache2_size = 1024;
|
||||||
self->client_info.cache3_entries = 262;
|
self->client_info.cache3_entries = 262;
|
||||||
self->client_info.cache3_size = 4096;
|
self->client_info.cache3_size = 4096;
|
||||||
|
DEBUG(("out xrdp_rdp_create"));
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -991,7 +993,12 @@ xrdp_rdp_process_data(struct xrdp_rdp* self, struct stream* s)
|
|||||||
int APP_CC
|
int APP_CC
|
||||||
xrdp_rdp_disconnect(struct xrdp_rdp* self)
|
xrdp_rdp_disconnect(struct xrdp_rdp* self)
|
||||||
{
|
{
|
||||||
return xrdp_sec_disconnect(self->sec_layer);
|
int rv;
|
||||||
|
|
||||||
|
DEBUG(("in xrdp_rdp_disconnect"));
|
||||||
|
rv = xrdp_sec_disconnect(self->sec_layer);
|
||||||
|
DEBUG(("out xrdp_rdp_disconnect"));
|
||||||
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
@ -1000,19 +1007,23 @@ xrdp_rdp_send_deactive(struct xrdp_rdp* self)
|
|||||||
{
|
{
|
||||||
struct stream* s;
|
struct stream* s;
|
||||||
|
|
||||||
|
DEBUG(("in xrdp_rdp_send_deactive"));
|
||||||
make_stream(s);
|
make_stream(s);
|
||||||
init_stream(s, 8192);
|
init_stream(s, 8192);
|
||||||
if (xrdp_rdp_init(self, s) != 0)
|
if (xrdp_rdp_init(self, s) != 0)
|
||||||
{
|
{
|
||||||
free_stream(s);
|
free_stream(s);
|
||||||
|
DEBUG(("out xrdp_rdp_send_deactive error"));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
s_mark_end(s);
|
s_mark_end(s);
|
||||||
if (xrdp_rdp_send(self, s, RDP_PDU_DEACTIVATE) != 0)
|
if (xrdp_rdp_send(self, s, RDP_PDU_DEACTIVATE) != 0)
|
||||||
{
|
{
|
||||||
free_stream(s);
|
free_stream(s);
|
||||||
|
DEBUG(("out xrdp_rdp_send_deactive error"));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
free_stream(s);
|
free_stream(s);
|
||||||
|
DEBUG(("out xrdp_rdp_send_deactive"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -28,9 +28,11 @@ xrdp_tcp_create(struct xrdp_iso* owner, int sck)
|
|||||||
{
|
{
|
||||||
struct xrdp_tcp* self;
|
struct xrdp_tcp* self;
|
||||||
|
|
||||||
|
DEBUG((" in xrdp_tcp_create"));
|
||||||
self = (struct xrdp_tcp*)g_malloc(sizeof(struct xrdp_tcp), 1);
|
self = (struct xrdp_tcp*)g_malloc(sizeof(struct xrdp_tcp), 1);
|
||||||
self->iso_layer = owner;
|
self->iso_layer = owner;
|
||||||
self->sck = sck;
|
self->sck = sck;
|
||||||
|
DEBUG((" out xrdp_tcp_create"));
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user