]> git.sesse.net Git - rdpsrv/blobdiff - rdpsrv.c
Try to send the odd 0x03 RDP5 data before bitmap updates.
[rdpsrv] / rdpsrv.c
index 18c5b7a84af54daefa6397bb30d4ed78d54dfba8..f8ef8f218e30af7f141e40e2eb29c1d416ee281f 100644 (file)
--- a/rdpsrv.c
+++ b/rdpsrv.c
@@ -199,6 +199,20 @@ void handle_control_pdu(STREAM s)
        }
 }
 
+void
+handle_font2_pdu(STREAM s)
+{
+       printf("FONT2 PDU, responding with magic\n");
+
+       s = rdp_init_data(8);
+       out_uint16_le(s, 0);
+       out_uint16_le(s, 0);
+       out_uint16_le(s, 3);
+       out_uint16_le(s, 4);
+       s_mark_end(s);
+       rdp_send_data(s, 0x28);
+}
+
 struct ServerInitialization {
        unsigned short width;
        unsigned short height;
@@ -357,6 +371,7 @@ int serve_client()
 
        for ( ;; ) {
                uint8 type, data_pdu_type;
+               uint16 id;
                STREAM s;
 
                fd_set readfs;
@@ -384,7 +399,12 @@ int serve_client()
                                                handle_control_pdu(s);
                                                break;
                                        case RDP_DATA_PDU_SYNCHRONISE:
-                                               rdp_send_synchronise(s);
+                                               in_uint16_le(s, id);
+                                               printf("Synchronise, id=%u\n", id);
+                                               rdp_send_synchronise(id);
+                                               break;
+                                       case RDP_DATA_PDU_FONT2:
+                                               handle_font2_pdu(s);
                                                break;
                                        default:
                                                printf("Unknown data PDU type %u\n", data_pdu_type);