aboutsummaryrefslogtreecommitdiffstats
path: root/socket.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-08-26 21:31:20 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-08-26 21:31:20 +0000
commitaa0d39fe51eb00dcb82969d273782b25884f105a (patch)
treef66545a418d82ccf393e6091e5bb942bf69eea5f /socket.c
parent2f5adc9ba38c8df30e80cb7ad04f1a54de557f80 (diff)
downloadfetchmail-aa0d39fe51eb00dcb82969d273782b25884f105a.tar.gz
fetchmail-aa0d39fe51eb00dcb82969d273782b25884f105a.tar.bz2
fetchmail-aa0d39fe51eb00dcb82969d273782b25884f105a.zip
We have IMAP support.
svn path=/trunk/; revision=65
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/socket.c b/socket.c
index acb8686f..e7d40904 100644
--- a/socket.c
+++ b/socket.c
@@ -76,17 +76,21 @@ int socket;
char *buf;
int len;
{
+ int rdlen = 0;
+
while (--len)
{
if (SockInternalRead(socket, buf, 1) != 1)
return -1;
+ else
+ rdlen++;
if (*buf == '\n')
break;
if (*buf != '\r') /* remove all CRs */
buf++;
}
*buf = 0;
- return 0;
+ return rdlen;
}
int SockPuts(socket,buf)