From: Wilfried Göesgens Date: Thu, 18 Mar 2010 20:49:05 +0000 (+0000) Subject: * sock_getln() should return the length of the string read, not bool for fail / success X-Git-Tag: v7.86~304 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=4835a9cb595d4302bdc2be4d94e86321b4138e95;p=citadel.git * sock_getln() should return the length of the string read, not bool for fail / success --- diff --git a/citadel/clientsocket.c b/citadel/clientsocket.c index 385f25e94..a9190754c 100644 --- a/citadel/clientsocket.c +++ b/citadel/clientsocket.c @@ -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; }