]> git.sesse.net Git - rdpsrv/commitdiff
Send the same value back in synchronise.
authorSteinar H. Gunderson <sesse@samfundet.no>
Sun, 6 Feb 2005 14:17:12 +0000 (14:17 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Sun, 6 Feb 2005 14:17:12 +0000 (14:17 +0000)
proto.h
rdp.c
rdpsrv.c

diff --git a/proto.h b/proto.h
index 20710c024069a3ab28b4409ae2b7d64359e11779..932901e12deedb6a241d2446b93ed9d2465e5827 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -79,6 +79,8 @@ BOOL rdp_connect(char *server, uint32 flags, char *domain, char *password, char
                 char *directory);
 void rdp_disconnect(void);
 void rdp_send_bitmap_update(unsigned x, unsigned y, unsigned width, unsigned height, unsigned char *data);
                 char *directory);
 void rdp_disconnect(void);
 void rdp_send_bitmap_update(unsigned x, unsigned y, unsigned width, unsigned height, unsigned char *data);
+void rdp_send_control(uint16 action);
+void rdp_send_synchronise(uint16 id);
 /* rdpdr.c */
 void rdpdr_send_connect(void);
 void rdpdr_send_name(void);
 /* rdpdr.c */
 void rdpdr_send_connect(void);
 void rdpdr_send_name(void);
diff --git a/rdp.c b/rdp.c
index 49ff6a9722394fee3cb0f3cc3a7fe1787dd26a54..111f37bc5ad0f9f6a82622aefde87f58f4fc4cb5 100644 (file)
--- a/rdp.c
+++ b/rdp.c
@@ -304,14 +304,14 @@ rdp_send_control(uint16 action)
 
 /* Send a synchronisation PDU */
 void
 
 /* 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 */
 {
        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);
 
        s_mark_end(s);
        rdp_send_data(s, RDP_DATA_PDU_SYNCHRONISE);
index 18c5b7a84af54daefa6397bb30d4ed78d54dfba8..96239711e83c8ed6f95924147d11a21570d45964 100644 (file)
--- a/rdpsrv.c
+++ b/rdpsrv.c
@@ -357,6 +357,7 @@ int serve_client()
 
        for ( ;; ) {
                uint8 type, data_pdu_type;
 
        for ( ;; ) {
                uint8 type, data_pdu_type;
+               uint16 id;
                STREAM s;
 
                fd_set readfs;
                STREAM s;
 
                fd_set readfs;
@@ -384,7 +385,15 @@ int serve_client()
                                                handle_control_pdu(s);
                                                break;
                                        case RDP_DATA_PDU_SYNCHRONISE:
                                                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:
+                                               // respond with the
+                                               // unknown 0x28 PDU
+                                               // here?
+                                               printf("FONT2, ignored\n");
                                                break;
                                        default:
                                                printf("Unknown data PDU type %u\n", data_pdu_type);
                                                break;
                                        default:
                                                printf("Unknown data PDU type %u\n", data_pdu_type);