diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-02-18 02:35:30 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-02-18 02:35:30 +0000 |
commit | 6a1b0f83e980b788b15054cc7d3223a8d0ed83ab (patch) | |
tree | 73a317f8788d12ae2a97523678306e4e0528237e /socket.c | |
parent | 7592b0c0805429cb8d73ce52eec4da82ce36e4bb (diff) | |
download | fetchmail-6a1b0f83e980b788b15054cc7d3223a8d0ed83ab.tar.gz fetchmail-6a1b0f83e980b788b15054cc7d3223a8d0ed83ab.tar.bz2 fetchmail-6a1b0f83e980b788b15054cc7d3223a8d0ed83ab.zip |
Janos Farkas's fixes.
svn path=/trunk/; revision=897
Diffstat (limited to 'socket.c')
-rw-r--r-- | socket.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -118,7 +118,8 @@ char *SockGets(char *buf, int len, FILE *sockfp) if (--len < 1) return NULL; do { - if ((n = recv(fileno(sockfp), bp, len, MSG_PEEK)) == -1) + /* return value of 0 is EOF, < 0 is error */ + if ((n = recv(fileno(sockfp), bp, len, MSG_PEEK)) <= 0) return NULL; if ((p = memchr(bp, '\n', n)) != NULL) { |