From: Steinar H. Gunderson Date: Sun, 6 Feb 2005 14:17:12 +0000 (+0000) Subject: Send the same value back in synchronise. X-Git-Url: https://git.sesse.net/?p=rdpsrv;a=commitdiff_plain;h=ebfc5fd4591ac6da73078e975e350825ed16ab99;ds=sidebyside Send the same value back in synchronise. --- diff --git a/proto.h b/proto.h index 20710c0..932901e 100644 --- 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); +void rdp_send_control(uint16 action); +void rdp_send_synchronise(uint16 id); /* rdpdr.c */ void rdpdr_send_connect(void); void rdpdr_send_name(void); diff --git a/rdp.c b/rdp.c index 49ff6a9..111f37b 100644 --- a/rdp.c +++ b/rdp.c @@ -304,14 +304,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); diff --git a/rdpsrv.c b/rdpsrv.c index 18c5b7a..9623971 100644 --- a/rdpsrv.c +++ b/rdpsrv.c @@ -357,6 +357,7 @@ int serve_client() for ( ;; ) { uint8 type, data_pdu_type; + uint16 id; STREAM s; fd_set readfs; @@ -384,7 +385,15 @@ 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: + // respond with the + // unknown 0x28 PDU + // here? + printf("FONT2, ignored\n"); break; default: printf("Unknown data PDU type %u\n", data_pdu_type);