X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=rdp.c;h=dc32fc298085a954b25c1bbd9f81ee33a69d1479;hb=refs%2Fheads%2Fmaster;hp=538e053ae821ea14f089036fd2c40c32aaf4dc02;hpb=55a546ab6b5970438e6cca1a962ec4e7dd669d11;p=rdpsrv diff --git a/rdp.c b/rdp.c index 538e053..dc32fc2 100644 --- a/rdp.c +++ b/rdp.c @@ -72,7 +72,7 @@ rdp_recv(uint8 * type) #if WITH_DEBUG DEBUG(("RDP packet #%d, (type %x, length %u)\n", ++g_packetno, *type, length)); - //hexdump(g_next_packet, length); + hexdump(g_next_packet, length); #endif /* */ g_next_packet += length; @@ -152,10 +152,13 @@ void rdp_send_bitmap_update(unsigned x, unsigned y, unsigned width, unsigned hei { STREAM s; - int length = 10*2 + width*height*3 + 5; + int length = 10*2 + width*height*3 + 5 + 3; - s = rdp5_init(length, 0); + s = rdp5_init(length, 1); + out_uint8(s, 3); // ?? + out_uint16_le(s, 0); // length + 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 @@ -174,7 +177,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); - rdp5_send(s, 0); + 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); } @@ -287,7 +290,7 @@ rdp_get_logon_info(STREAM s) } /* Send a control PDU */ -static void +void rdp_send_control(uint16 action) { STREAM s; @@ -303,15 +306,15 @@ rdp_send_control(uint16 action) } /* Send a synchronisation PDU */ -static void -rdp_send_synchronise(void) +void +rdp_send_synchronise(uint16 id) { STREAM s; s = rdp_init_data(4); out_uint16_le(s, 1); /* type */ - out_uint16_le(s, 1002); + out_uint16_le(s, id); s_mark_end(s); rdp_send_data(s, RDP_DATA_PDU_SYNCHRONISE);