]> git.sesse.net Git - rdpsrv/blobdiff - iso.c
Attempt to send an CC back (but fail?)
[rdpsrv] / iso.c
diff --git a/iso.c b/iso.c
index 9a343ad207f5dce2282a9fded81b85776be1af42..905e54a2fbf8b28cfe8953f38ae70cc5c848b11d 100644 (file)
--- a/iso.c
+++ b/iso.c
@@ -182,6 +182,42 @@ iso_recv(void)
        return s;
 }
 
+BOOL
+iso_recv_connect(int server_sock)
+{
+       STREAM s;
+       uint8 code;
+
+       tcp_recv_connect(server_sock);
+       
+       s = iso_recv_msg(&code);
+       if (s == NULL)
+               return 0;
+
+       if (code != ISO_PDU_CR)
+       {
+               error("expected CR, got 0x%x\n", code);
+               return 0;
+       }
+
+       DEBUG(("Got ISO connection request\n"));
+
+       iso_init(0);
+       
+       /* send an CC PDU back */
+       out_uint8(s, 3);        /* version */
+       out_uint8(s, 0);        /* reserved */
+       out_uint16_be(s, 0);
+
+       out_uint8(s, 2);        /* hdrlen */
+       out_uint8(s, ISO_PDU_CC);       /* code */
+       out_uint8(s, 0x80);     /* eot */
+
+       tcp_send(s);
+       
+       return 1;
+}
+
 /* Disconnect from the ISO layer */
 void
 iso_disconnect(void)