]> git.sesse.net Git - rdpsrv/blobdiff - iso.c
Pull in rdp.c from rdesktop, use rdp_recv().
[rdpsrv] / iso.c
diff --git a/iso.c b/iso.c
index 26e967b384560fbe790d92e047ac8e57e9354d33..746a9457c84abb54c383a9954663bb31dde3a950 100644 (file)
--- a/iso.c
+++ b/iso.c
@@ -182,28 +182,28 @@ iso_recv(void)
        return s;
 }
 
-/* Establish a connection up to the ISO layer */
 BOOL
-iso_connect(char *server, char *username)
+iso_recv_connect(int server_sock)
 {
+       STREAM s, t;
        uint8 code;
 
-       if (!tcp_connect(server))
-               return False;
-
-       iso_send_connection_request(username);
-
-       if (iso_recv_msg(&code) == NULL)
-               return False;
+       tcp_recv_connect(server_sock);
+       
+       s = iso_recv_msg(&code);
+       if (s == NULL)
+               return 0;
 
-       if (code != ISO_PDU_CC)
+       if (code != ISO_PDU_CR)
        {
-               error("expected CC, got 0x%x\n", code);
-               tcp_disconnect();
-               return False;
+               error("expected CR, got 0x%x\n", code);
+               return 0;
        }
 
-       return True;
+       DEBUG(("Got ISO connection request\n"));
+
+       iso_send_msg(ISO_PDU_CC);
+       return 1;
 }
 
 /* Disconnect from the ISO layer */