aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-09-25 02:23:21 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-09-25 02:23:21 +0000
commit281cff65bf8c2c87ad995379efc27b3a57ea2888 (patch)
treec5bc5695e3c9ef239af75e307721aa6e9852f4ab
parent2e9a6dae88d25e8068ab855a86e1ac46f8bdab00 (diff)
downloadfetchmail-281cff65bf8c2c87ad995379efc27b3a57ea2888.tar.gz
fetchmail-281cff65bf8c2c87ad995379efc27b3a57ea2888.tar.bz2
fetchmail-281cff65bf8c2c87ad995379efc27b3a57ea2888.zip
One more simplification.
svn path=/trunk/; revision=130
-rw-r--r--pop3.c40
1 files changed, 4 insertions, 36 deletions
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,
@@ -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,