]> code.citadel.org Git - citadel.git/blobdiff - citadel/sysdep.c
* if we got more in our commandbuf than the last commandloop run evaluated in the...
[citadel.git] / citadel / sysdep.c
index 595d9b5b12c60c9fd896c3f553e1f358ffe0cd84..0420bc6c168a2b8e1937be9304f77eb5388b3542 100644 (file)
@@ -612,6 +612,15 @@ int client_read_to(char *buf, int bytes, int timeout)
 }
 
 
+int HaveMoreLinesWaiting(CitContext *CCC)
+{
+       if ((CCC->Pos == NULL) && (StrLength(CCC->ReadBuf) == 0))
+               return 0;
+       else
+               return 1;
+}
+
+
 /*
  * Read data from the client socket with default timeout.
  * (This is implemented in terms of client_read_to() and could be
@@ -1053,6 +1062,10 @@ SKIP_SELECT:
                        /* If the client has sent a command, execute it. */
                        if (CC->input_waiting) {
                                CC->h_command_function();
+
+                               while (HaveMoreLinesWaiting(CC))
+                                      CC->h_command_function();
+
                                CC->input_waiting = 0;
                        }