process_orders now take the number of orders to process as an argument

instead of reading it itself. Adaptation for the RDP5 code to work.

Added some debugging.

Indent fixes.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@348 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Erik Forsberg 2003-03-27 13:17:26 +00:00
parent 8d6c2bf1e9
commit 6ab3861ea0

View File

@ -605,9 +605,9 @@ process_text2(STREAM s, TEXT2_ORDER * os, uint32 present, BOOL delta)
if (present & 0x002000) if (present & 0x002000)
in_uint16_le(s, os->boxbottom); in_uint16_le(s, os->boxbottom);
if (present & 0x004000) /* fix for connecting to a server that */ if (present & 0x004000) /* fix for connecting to a server that */
in_uint8s(s, 10); /* was disconnected with mstsc.exe */ in_uint8s(s, 10); /* was disconnected with mstsc.exe */
/* 0x008000, 0x020000, and 0x040000 are present too ??? */ /* 0x008000, 0x020000, and 0x040000 are present too ??? */
if (present & 0x080000) if (present & 0x080000)
in_uint16_le(s, os->x); in_uint16_le(s, os->x);
@ -703,6 +703,10 @@ process_bmpcache(STREAM s)
bitmap = ui_create_bitmap(width, height, bmpdata); bitmap = ui_create_bitmap(width, height, bmpdata);
cache_put_bitmap(cache_id, cache_idx, bitmap); cache_put_bitmap(cache_id, cache_idx, bitmap);
} }
else
{
DEBUG(("Failed to decompress bitmap data\n"));
}
xfree(bmpdata); xfree(bmpdata);
} }
@ -811,19 +815,14 @@ process_secondary_order(STREAM s)
/* Process an order PDU */ /* Process an order PDU */
void void
process_orders(STREAM s) process_orders(STREAM s, uint16 num_orders)
{ {
RDP_ORDER_STATE *os = &order_state; RDP_ORDER_STATE *os = &order_state;
uint32 present; uint32 present;
uint16 num_orders;
uint8 order_flags; uint8 order_flags;
int size, processed = 0; int size, processed = 0;
BOOL delta; BOOL delta;
in_uint8s(s, 2); /* pad */
in_uint16_le(s, num_orders);
in_uint8s(s, 2); /* pad */
while (processed < num_orders) while (processed < num_orders)
{ {
in_uint8(s, order_flags); in_uint8(s, order_flags);