]> git.sesse.net Git - rdpsrv/blobdiff - rdp.c
Reduce small block size to 32x32, and parametrize (#defines instead of hardcoding)
[rdpsrv] / rdp.c
diff --git a/rdp.c b/rdp.c
index 49ff6a9722394fee3cb0f3cc3a7fe1787dd26a54..dc32fc298085a954b25c1bbd9f81ee33a69d1479 100644 (file)
--- a/rdp.c
+++ b/rdp.c
@@ -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, 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
@@ -304,14 +307,14 @@ rdp_send_control(uint16 action)
 
 /* Send a synchronisation PDU */
 void
-rdp_send_synchronise(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);