X-Git-Url: https://git.sesse.net/?p=rdpsrv;a=blobdiff_plain;f=rdpsrv.c;h=138cff249551ce3f85b2a1ec54f7e13f51e47fe6;hp=e321ba6342c3b8806fc57bb9f6c4bcabda2c47eb;hb=abc1558eebc4afcd9a0a87b8bcad75a4bb41d84b;hpb=48580be79f1c97788f7f3a92b9791056b9773058 diff --git a/rdpsrv.c b/rdpsrv.c index e321ba6..138cff2 100644 --- 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); } }