X-Git-Url: https://git.sesse.net/?p=rdpsrv;a=blobdiff_plain;f=rdp.c;h=4ea369807335fc929a60c15ee8037b632c2a41ef;hp=e8e69cd0a2f2bbe5472a7a9141374f210b0c900d;hb=40cde82f161a4891fb396e4f73087a9de7a5a978;hpb=3c33e7f9fad502e7a1ac4ef92edd98a666a5a918 diff --git a/rdp.c b/rdp.c index e8e69cd..4ea3698 100644 --- a/rdp.c +++ b/rdp.c @@ -152,8 +152,14 @@ void rdp_send_bitmap_update(unsigned x, unsigned y, unsigned width, unsigned hei { STREAM s; - s = rdp_init_data(11*2 + width*height*3); - out_uint16_le(s, RDP_UPDATE_BITMAP); + int length = 10*2 + width*height*3 + 5; + + s = rdp5_init(length, 1); + + out_uint8(s, 1); // process bitmap update + out_uint16_le(s, 10*2 + width*height*3 + 2); // RDP5 chunk length + out_uint16_le(s, 10*2 + width*height*3); // part length + out_uint16_le(s, 1); // one update out_uint16_le(s, x); // left, top, right, bottom out_uint16_le(s, y); @@ -168,7 +174,7 @@ void rdp_send_bitmap_update(unsigned x, unsigned y, unsigned width, unsigned hei out_uint8p(s, data, width*height*3); s_mark_end(s); - rdp_send_data(s, RDP_DATA_PDU_UPDATE); + rdp5_send(s, 1); } #define EXPECT16(value) { in_uint16_le(s, unknown); if (unknown != (value)) printf("Unknown value on code line %u; expected 0x%x, got 0x%x\n", __LINE__, (value), unknown); }