diff options
| author | Eric S. Raymond <esr@thyrsus.com> | 1997-01-24 00:06:47 +0000 | 
|---|---|---|
| committer | Eric S. Raymond <esr@thyrsus.com> | 1997-01-24 00:06:47 +0000 | 
| commit | d92b8233c987c8f48c56500bc4d7bd84c82ded63 (patch) | |
| tree | dbdd7d0010d435946024e4e443de15b85c0316ad /pop2.c | |
| parent | 7f0f666a6dab4ce685d25346b5f17857076e4c2f (diff) | |
| download | fetchmail-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.c | 11 | 
1 files changed, 2 insertions, 9 deletions
@@ -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);  }  | 
