From 281cff65bf8c2c87ad995379efc27b3a57ea2888 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 25 Sep 1996 02:23:21 +0000 Subject: One more simplification. svn path=/trunk/; revision=130 --- pop3.c | 40 ++++------------------------------------ 1 file changed, 4 insertions(+), 36 deletions(-) (limited to 'pop3.c') diff --git a/pop3.c b/pop3.c index 6ff42df2..25bae04c 100644 --- a/pop3.c +++ b/pop3.c @@ -20,7 +20,6 @@ #ifdef HAVE_PROTOTYPES /* prototypes for internal functions */ int POP3_sendSTAT (int *msgcount, int socket); -int POP3_sendLAST (int *last, int socket); int POP3_sendUIDL (int num, int socket, char **cp); int POP3_BuildDigest (char *buf, struct hostrec *options); #endif @@ -171,7 +170,10 @@ int *firstp; int num; /* try LAST first */ - ok = POP3_sendLAST(firstp, socket); + gen_send(socket,"LAST"); + ok = pop3_ok(buf,socket); + if (ok == 0 && sscanf(buf, "%d", firstp) == 0) + return(PS_ERROR); use_uidl = (ok != 0); /* otherwise, if we have a stored last ID for this host, @@ -289,40 +291,6 @@ int socket; return(ok); } -/****************************************************************** - function: POP3_sendLAST - description: send the LAST command to the server, which should - return the number of the last message number retrieved - from the server. - arguments: - last integer buffer to receive last message# - - ret. value: zero if success, else status code. - globals: SockPrintf, pop3_ok. - calls: reads outlevel. - *****************************************************************/ - -int POP3_sendLAST (last, socket) -int *last; -int socket; -{ - int ok; - char buf [POPBUFSIZE]; - - SockPrintf(socket,"LAST\r\n"); - if (outlevel == O_VERBOSE) - fprintf(stderr,"> LAST\n"); - - ok = pop3_ok(buf,socket); - if (ok == 0 && sscanf(buf,"%d",last) == 0) - ok = PS_ERROR; - - if (ok != 0 && outlevel > O_SILENT) - fprintf(stderr,"Server says '%s' to LAST command.\n",buf); - - return(ok); -} - /****************************************************************** function: POP3_sendUIDL description: send the UIDL command to the server, -- cgit v1.2.3