void update_recv_orders(rdpUpdate* update, STREAM* s) { uint16 numberOrders; stream_seek_uint16(s); /* pad2OctetsA (2 bytes) */ stream_read_uint16(s, numberOrders); /* numberOrders (2 bytes) */ stream_seek_uint16(s); /* pad2OctetsB (2 bytes) */ while (numberOrders > 0) { update_recv_order(update, s); numberOrders--; } }
BOOL update_recv_orders(rdpUpdate* update, STREAM* s) { UINT16 numberOrders; stream_seek_UINT16(s); /* pad2OctetsA (2 bytes) */ stream_read_UINT16(s, numberOrders); /* numberOrders (2 bytes) */ stream_seek_UINT16(s); /* pad2OctetsB (2 bytes) */ while (numberOrders > 0) { if (!update_recv_order(update, s)) return FALSE; numberOrders--; } return TRUE; }
BOOL update_recv_orders(rdpUpdate* update, wStream* s) { UINT16 numberOrders; if (Stream_GetRemainingLength(s) < 6) return FALSE; Stream_Seek_UINT16(s); /* pad2OctetsA (2 bytes) */ Stream_Read_UINT16(s, numberOrders); /* numberOrders (2 bytes) */ Stream_Seek_UINT16(s); /* pad2OctetsB (2 bytes) */ while (numberOrders > 0) { if (!update_recv_order(update, s)) return FALSE; numberOrders--; } return TRUE; }