X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=rdpsrv.c;h=138cff249551ce3f85b2a1ec54f7e13f51e47fe6;hb=abc1558eebc4afcd9a0a87b8bcad75a4bb41d84b;hp=bb5b1db4727dae82a7484d714216d1cffcff0146;hpb=d3b814ac537b22ffabdd350332e819ad002b8924;p=rdpsrv diff --git a/rdpsrv.c b/rdpsrv.c index bb5b1db..138cff2 100644 --- a/rdpsrv.c +++ b/rdpsrv.c @@ -61,15 +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); } }