]> git.sesse.net Git - rdpsrv/commitdiff
Accept ISO CR.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 3 Feb 2005 23:05:24 +0000 (23:05 +0000)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 3 Feb 2005 23:05:24 +0000 (23:05 +0000)
iso.c
proto.h
rdpsrv.c

diff --git a/iso.c b/iso.c
index 9a343ad207f5dce2282a9fded81b85776be1af42..c694624962c6bb90d68262dfa02606542d951ec1 100644 (file)
--- a/iso.c
+++ b/iso.c
@@ -182,6 +182,29 @@ 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"));
+
+       return 1;
+}
+
 /* Disconnect from the ISO layer */
 void
 iso_disconnect(void)
diff --git a/proto.h b/proto.h
index db5e98fa202a1cd3fa0829176258a0c2593a95b6..97a628bcbebbec061fa3283d2fe2a15c3f97609c 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -32,7 +32,7 @@ int get_current_workarea(uint32 * x, uint32 * y, uint32 * width, uint32 * height
 STREAM iso_init(int length);
 void iso_send(STREAM s);
 STREAM iso_recv(void);
-BOOL iso_connect(char *server, char *username);
+BOOL iso_recv_connect(int server_sock);
 void iso_disconnect(void);
 /* licence.c */
 void licence_process(STREAM s);
index 59442eb6d767566519e77990ea548ccabd0b9ef1..86235ec2544d0dd1fb76e7cb8ee786fb8634892c 100644 (file)
--- a/rdpsrv.c
+++ b/rdpsrv.c
@@ -16,8 +16,10 @@ int main()
 {
        int server_sock = create_server_socket();
        for ( ;; ) {
-               tcp_recv_connect(server_sock);
+               iso_recv_connect(server_sock);
+               printf("Got connection.\n");
                serve_client();
+               printf("Client closed.\n");
        }
 }