aboutsummaryrefslogtreecommitdiffstats
path: root/pop2.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-01-24 00:06:47 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-01-24 00:06:47 +0000
commitd92b8233c987c8f48c56500bc4d7bd84c82ded63 (patch)
treedbdd7d0010d435946024e4e443de15b85c0316ad /pop2.c
parent7f0f666a6dab4ce685d25346b5f17857076e4c2f (diff)
downloadfetchmail-d92b8233c987c8f48c56500bc4d7bd84c82ded63.tar.gz
fetchmail-d92b8233c987c8f48c56500bc4d7bd84c82ded63.tar.bz2
fetchmail-d92b8233c987c8f48c56500bc4d7bd84c82ded63.zip
Introduce gen_recv.
svn path=/trunk/; revision=814
Diffstat (limited to 'pop2.c')
-rw-r--r--pop2.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/pop2.c b/pop2.c
index fcf907f0..80611a5c 100644
--- a/pop2.c
+++ b/pop2.c
@@ -23,14 +23,9 @@ int pop2_ok (FILE *sockfp, char *argbuf)
char buf [POPBUFSIZE+1];
pound_arg = equal_arg = -1;
- if (SockGets(buf, sizeof(buf), sockfp)) {
- if (buf[strlen(buf)-1] == '\n')
- buf[strlen(buf)-1] = '\0';
- if (buf[strlen(buf)-1] == '\r')
- buf[strlen(buf)-1] = '\r';
- if (outlevel == O_VERBOSE)
- error(0, 0, "POP2< %s", buf);
+ if ((ok = gen_recv(sockfp, buf, sizeof(buf))) == 0)
+ {
if (buf[0] == '+')
ok = 0;
else if (buf[0] == '#')
@@ -51,8 +46,6 @@ int pop2_ok (FILE *sockfp, char *argbuf)
if (argbuf != NULL)
strcpy(argbuf,buf);
}
- else
- ok = PS_SOCKET;
return(ok);
}