]> git.sesse.net Git - rdpsrv/blobdiff - rdpsrv.c
Support CJrq/CJcf.
[rdpsrv] / rdpsrv.c
index e321ba6342c3b8806fc57bb9f6c4bcabda2c47eb..138cff249551ce3f85b2a1ec54f7e13f51e47fe6 100644 (file)
--- a/rdpsrv.c
+++ b/rdpsrv.c
@@ -61,14 +61,17 @@ int create_server_socket()
 
 int serve_client()
 {
-       mcs_recv_connect_initial();
+       if (!mcs_recv_connect_initial())
+               error("MCS_CONNECT_INITIAL recv failed");
+       mcs_send_connect_response();
        
        for ( ;; ) {
                short channel;
+               STREAM s;
                
                /* receive ISO packets */
-               mcs_recv(&channel);
-
-               printf("Packet on ch %u\n", channel);
+               s = mcs_recv(&channel);
+               if (s != NULL)
+                       printf("Packet on ch %u\n", channel);
        }
 }