Check return value of mcs_recv_connect_initial().
[rdpsrv] / rdpsrv.c
index bb5b1db..c5b4169 100644 (file)
--- a/rdpsrv.c
+++ b/rdpsrv.c
@@ -61,7 +61,8 @@ 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 ( ;; ) {