added debug out, added update sync

This commit is contained in:
jsorg71 2007-04-08 22:13:00 +00:00
parent d3ddb22d1c
commit d373ee9322
4 changed files with 13 additions and 4 deletions

View File

@ -140,6 +140,7 @@ libxrdp_send_palette(struct xrdp_session* session, int* palette)
{
return 0;
}
DEBUG(("libxrdp_send_palette sending palette"));
/* clear orders */
libxrdp_orders_force_send(session);
make_stream(s);
@ -188,6 +189,7 @@ libxrdp_send_bitmap(struct xrdp_session* session, int width, int height,
struct stream* s;
struct stream* temp_s;
DEBUG(("libxrdp_send_bitmap sending bitmap"));
Bpp = (bpp + 7) / 8;
e = width % 4;
if (e != 0)
@ -343,6 +345,9 @@ libxrdp_send_pointer(struct xrdp_session* session, int cache_idx,
int i;
int j;
return 0;
DEBUG(("libxrdp_send_pointer sending cursor"));
make_stream(s);
init_stream(s, 8192);
xrdp_rdp_init_data((struct xrdp_rdp*)session->rdp, s);
@ -381,6 +386,7 @@ libxrdp_set_pointer(struct xrdp_session* session, int cache_idx)
{
struct stream* s;
DEBUG(("libxrdp_set_pointer sending cursor index"));
make_stream(s);
init_stream(s, 8192);
xrdp_rdp_init_data((struct xrdp_rdp*)session->rdp, s);

View File

@ -291,6 +291,8 @@ int APP_CC
xrdp_rdp_send_data(struct xrdp_rdp* self, struct stream* s,
int data_pdu_type);
int APP_CC
xrdp_rdp_send_data_update_sync(struct xrdp_rdp* self);
int APP_CC
xrdp_rdp_incoming(struct xrdp_rdp* self);
int APP_CC
xrdp_rdp_send_demand_active(struct xrdp_rdp* self);

View File

@ -136,6 +136,7 @@ xrdp_mcs_recv(struct xrdp_mcs* self, struct stream* s, int* chan)
{
in_uint16_be(s, userid);
in_uint16_be(s, chanid);
DEBUG((" adding channel %4.4x", chanid));
xrdp_mcs_send_cjcf(self, userid, chanid);
continue;
}

View File

@ -105,7 +105,7 @@ xrdp_orders_send(struct xrdp_orders* self)
if (self->order_level > 0)
{
self->order_level--;
if (self->order_level == 0 && self->order_count > 0)
if ((self->order_level == 0) && (self->order_count > 0))
{
s_mark_end(self->out_s);
DEBUG(("xrdp_orders_send sending %d orders", self->order_count));
@ -127,7 +127,7 @@ xrdp_orders_send(struct xrdp_orders* self)
int APP_CC
xrdp_orders_force_send(struct xrdp_orders* self)
{
if (self->order_level > 0 && self->order_count > 0)
if ((self->order_level > 0) && (self->order_count > 0))
{
s_mark_end(self->out_s);
DEBUG(("xrdp_orders_force_send sending %d orders", self->order_count));
@ -174,11 +174,11 @@ xrdp_orders_check(struct xrdp_orders* self, int max_size)
}
}
size = self->out_s->p - self->order_count_ptr;
if (size < 0 || size > max_packet_size)
if ((size < 0) || (size > max_packet_size))
{
return 1;
}
if (size + max_size + 100 > max_packet_size)
if ((size + max_size + 100) > max_packet_size)
{
xrdp_orders_force_send(self);
xrdp_orders_init(self);