]> code.citadel.org Git - citadel.git/blobdiff - citadel/clientsocket.c
* sock_getln() should return the length of the string read, not bool for fail / success
[citadel.git] / citadel / clientsocket.c
index 385f25e941381da91d8285cc4239aa5226afd278..a9190754c96c55e9d582184fa4a9b58f11746c8f 100644 (file)
@@ -255,8 +255,9 @@ int sock_getln(int *sock, char *buf, int bufsize)
        FlushStrBuf(CCC->sMigrateBuf);
        if (retval < 0) {
                safestrncpy(&buf[i], "000", bufsize - i);
+               i += 3;
        }
-       return(retval >= 0);
+       return i;
 }