From 6e02ceee70e3fadb70387fe8cc23c8e6e95d47b7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Tue, 9 Feb 2010 23:47:22 +0000 Subject: [PATCH] * if we got more in our commandbuf than the last commandloop run evaluated in the first approach, call it until its empty. --- citadel/sysdep.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/citadel/sysdep.c b/citadel/sysdep.c index 595d9b5b1..0420bc6c1 100644 --- a/citadel/sysdep.c +++ b/citadel/sysdep.c @@ -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; } -- 2.39.2