From d92b8233c987c8f48c56500bc4d7bd84c82ded63 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 24 Jan 1997 00:06:47 +0000 Subject: Introduce gen_recv. svn path=/trunk/; revision=814 --- pop2.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'pop2.c') 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); } -- cgit v1.2.3