diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-09-25 02:23:21 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-09-25 02:23:21 +0000 |
commit | 281cff65bf8c2c87ad995379efc27b3a57ea2888 (patch) | |
tree | c5bc5695e3c9ef239af75e307721aa6e9852f4ab /pop3.c | |
parent | 2e9a6dae88d25e8068ab855a86e1ac46f8bdab00 (diff) | |
download | fetchmail-281cff65bf8c2c87ad995379efc27b3a57ea2888.tar.gz fetchmail-281cff65bf8c2c87ad995379efc27b3a57ea2888.tar.bz2 fetchmail-281cff65bf8c2c87ad995379efc27b3a57ea2888.zip |
One more simplification.
svn path=/trunk/; revision=130
Diffstat (limited to 'pop3.c')
-rw-r--r-- | pop3.c | 40 |
1 files changed, 4 insertions, 36 deletions
@@ -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, @@ -290,40 +292,6 @@ int socket; } /****************************************************************** - 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, |