From 4835a9cb595d4302bdc2be4d94e86321b4138e95 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Thu, 18 Mar 2010 20:49:05 +0000 Subject: [PATCH] * sock_getln() should return the length of the string read, not bool for fail / success --- citadel/clientsocket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.39.2