Try to send back the magical 0x28 PDU (not very well ATM :-) )
authorSteinar H. Gunderson <sesse@samfundet.no>
Sun, 6 Feb 2005 14:42:13 +0000 (14:42 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Sun, 6 Feb 2005 14:42:13 +0000 (14:42 +0000)
proto.h
rdpsrv.c

diff --git a/proto.h b/proto.h
index 932901e..1d6d755 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -66,6 +66,8 @@ STREAM rdp5_init(int maxlen, BOOL encryption);
 void rdp5_send(STREAM s, BOOL encryption);
 void rdp5_process(STREAM s, BOOL encryption);
 /* rdp.c */
+STREAM rdp_init_data(int maxlen);
+void rdp_send_data(STREAM s, uint8 data_pdu_type);
 STREAM rdp_recv(uint8 * type);
 void rdp_out_unistr(STREAM s, char *string, int len);
 void rdp_recv_input(STREAM s, uint32 *time, uint16 *message_type, uint16 *device_flags, uint16 *param1, uint16 *param2);
index 9623971..f8ef8f2 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;
@@ -390,10 +404,7 @@ int serve_client()
                                                rdp_send_synchronise(id);
                                                break;
                                        case RDP_DATA_PDU_FONT2:
-                                               // respond with the
-                                               // unknown 0x28 PDU
-                                               // here?
-                                               printf("FONT2, ignored\n");
+                                               handle_font2_pdu(s);
                                                break;
                                        default:
                                                printf("Unknown data PDU type %u\n", data_pdu_type);