aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-09-28 05:13:52 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-09-28 05:13:52 +0000
commit482878528c9ef482583666e53aad69bae3128820 (patch)
tree510a976484169cdfe2a4165ea8b95e833dadb6cd
parent14992ea3f8d34e9784f062b6c890b326bb8b46ec (diff)
downloadfetchmail-482878528c9ef482583666e53aad69bae3128820.tar.gz
fetchmail-482878528c9ef482583666e53aad69bae3128820.tar.bz2
fetchmail-482878528c9ef482583666e53aad69bae3128820.zip
Better comments.
svn path=/trunk/; revision=169
-rw-r--r--pop3.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/pop3.c b/pop3.c
index 412c3e34..4f74c0c3 100644
--- a/pop3.c
+++ b/pop3.c
@@ -163,11 +163,12 @@ int *firstp;
return(ok);
/*
- * Ask for number of last message retrieved.
- * Newer, RFC-1760-conformant POP servers may not have the LAST command.
- * Therefore we don't croak if we get a nonzero return. Instead, send
- * UIDL and try to find the last received ID stored for this host in
- * the list we get back.
+ * Newer, RFC-1725-conformant POP servers may not have the LAST command.
+ * Try LAST first as it simplifies life. If it fails, go through the
+ * contortions with UID lists required.
+ *
+ * We could reverse this order (checking for UID capabilities first),
+ * but if LAST works we can finish faster and do fewer mallocs.
*/
*firstp = 1;
use_uidl = 0;
@@ -181,6 +182,7 @@ int *firstp;
if (ok == 0 && sscanf(buf, "%d", &num) == 0)
return(PS_ERROR);
+ /* crucial fork in the road here */
use_uidl = (ok != 0);
if (!use_uidl)