if StrBuf_ServGetln() is called in a loop, its return value has to be checked for...
[citadel.git] / webcit / webcit.c
index 251c7df9a74422f98d62295a6e5d4269c8cc7228..9de1ad242289209df0864d5fbb24f95e3ce8c0fb 100644 (file)
@@ -407,7 +407,8 @@ void ajax_servcmd(void)
                }
        case 1:
                while (!Done) {
-                       StrBuf_ServGetln(Buf);
+                       if (StrBuf_ServGetln(Buf) < 0)
+                               break;
                        if ( (StrLength(Buf)==3) && 
                             !strcmp(ChrPtr(Buf), "000")) {
                                Done = 1;