Decode mouse events, try to send RDP4 bitmap updates back (?).
[rdpsrv] / secure.c
index 62e59a5..56c8bef 100644 (file)
--- a/secure.c
+++ b/secure.c
@@ -842,7 +842,7 @@ sec_recv(void)
        uint16 channel;
        STREAM s;
 
-       while ((s = mcs_recv(&channel)) != NULL)
+       if ((s = mcs_recv(&channel)) != NULL)
        {
                if (/*g_encryption || !g_licence_issued*/ 1)
                {
@@ -883,7 +883,7 @@ sec_recv(void)
                                        }
                                }
                                
-                               continue;
+                               return NULL;
                        }
 
                        if (sec_flags & SEC_LOGON_INFO) 
@@ -901,7 +901,7 @@ sec_recv(void)
                                        sec_send(s, SEC_LICENCE_NEG);
                                }
                                
-                               continue;
+                               return NULL;
                        }
 
                        if (sec_flags & SEC_CLIENT_RANDOM) {
@@ -934,7 +934,7 @@ sec_recv(void)
 
                                // now we can generate the keys
                                sec_generate_keys(inr + SEC_RANDOM_SIZE, cacert, 1);
-                               continue;
+                               return NULL;
                        }
                }
 
@@ -942,7 +942,7 @@ sec_recv(void)
                if (channel != MCS_GLOBAL_CHANNEL)
                {
                        channel_process(s, channel);
-                       continue;
+                       return NULL;
                }
 
                return s;