]> git.sesse.net Git - rdpsrv/blobdiff - iso.c
Decode mouse events, try to send RDP4 bitmap updates back (?).
[rdpsrv] / iso.c
diff --git a/iso.c b/iso.c
index 0c2f945f94aa2376be7481db5500b4d25df0d4dd..a098ad5f50826b3e566cf3d849a62816a5488105 100644 (file)
--- a/iso.c
+++ b/iso.c
@@ -22,7 +22,7 @@
 
 /* Send a self-contained ISO PDU */
 static void
 
 /* Send a self-contained ISO PDU */
 static void
-iso_send_msg(uint8 code)
+iso_send_msg(uint8 code, uint8 class)
 {
        STREAM s;
 
 {
        STREAM s;
 
@@ -34,9 +34,9 @@ iso_send_msg(uint8 code)
 
        out_uint8(s, 6);        /* hdrlen */
        out_uint8(s, code);
 
        out_uint8(s, 6);        /* hdrlen */
        out_uint8(s, code);
-       out_uint16(s, 0);       /* dst_ref */
-       out_uint16(s, 0);       /* src_ref */
-       out_uint8(s, 0);        /* class */
+       out_uint16(s, 0);               /* dst_ref */
+       out_uint16_be(s, 0x1234);       /* src_ref */
+       out_uint8(s, class);    /* class */
 
        s_mark_end(s);
        tcp_send(s);
 
        s_mark_end(s);
        tcp_send(s);
@@ -111,10 +111,8 @@ iso_recv_msg(uint8 * code)
 
        if ((version & 3) == 0)
        {
 
        if ((version & 3) == 0)
        {
-               // FIXME :-)
-               //              rdp5_process(s, version & 0x80);
-               printf("rdp5_process()\n");
-               goto next_packet;
+               rdp5_process(s, version & 0x80);
+               return NULL;
        }
 
        in_uint8s(s, 1);        /* hdrlen */
        }
 
        in_uint8s(s, 1);        /* hdrlen */
@@ -202,19 +200,7 @@ iso_recv_connect(int server_sock)
 
        DEBUG(("Got ISO connection request\n"));
 
 
        DEBUG(("Got ISO connection request\n"));
 
-       iso_init(0);
-       
-       /* send an CC PDU back */
-       out_uint8(t, 3);        /* version */
-       out_uint8(t, 0);        /* reserved */
-       out_uint16_be(t, 0);
-
-       out_uint8(t, 2);        /* hdrlen */
-       out_uint8(t, ISO_PDU_CC);       /* code */
-       out_uint8(t, 0x80);     /* eot */
-
-       tcp_send(t);
-       
+       iso_send_msg(ISO_PDU_CC, 0);
        return 1;
 }
 
        return 1;
 }
 
@@ -222,6 +208,6 @@ iso_recv_connect(int server_sock)
 void
 iso_disconnect(void)
 {
 void
 iso_disconnect(void)
 {
-       iso_send_msg(ISO_PDU_DR);
+       iso_send_msg(ISO_PDU_DR, 0);
        tcp_disconnect();
 }
        tcp_disconnect();
 }