* sock_getln() should return the length of the string read, not bool for fail / success
authorWilfried Göesgens <willi@citadel.org>
Thu, 18 Mar 2010 20:49:05 +0000 (20:49 +0000)
committerWilfried Göesgens <willi@citadel.org>
Thu, 18 Mar 2010 20:49:05 +0000 (20:49 +0000)
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;
 }