]> Pileus Git - ~andy/fetchmail/commitdiff
Do not disable TOP in 'keep, but not uidl' mode.
authorMatthias Andree <matthias.andree@gmx.de>
Mon, 9 Aug 2004 02:49:03 +0000 (02:49 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Mon, 9 Aug 2004 02:49:03 +0000 (02:49 -0000)
Patch by Jakob Hirsch, 2003-05-22, revised by Matthias Andree, 2004-08-08.

svn path=/trunk/; revision=3927

pop3.c

diff --git a/pop3.c b/pop3.c
index 230244d69842696eca4a8bf61d7e790f44d14402..ee2b9d4081a5e1e8e8e0976564f882fe4eac7c2a 100644 (file)
--- a/pop3.c
+++ b/pop3.c
@@ -589,7 +589,7 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting)
     sleep(3); /* to be _really_ safe, probably need sleep(5)! */
 
     /* we're peek-capable if use of TOP is enabled */
-    peek_capable = !(ctl->fetchall || ctl->keep);
+    peek_capable = !(ctl->fetchall || (ctl->keep && !ctl->server.uidl));
 
     /* we're approved */
     return(PS_SUCCESS);
@@ -1102,7 +1102,7 @@ static int pop3_fetch(int sock, struct query *ctl, int number, int *lenp)
      * The line count passed (99999999) is the maximum value CompuServe will
      * accept; it's much lower than the natural value 2147483646 (the maximum
      * twos-complement signed 32-bit integer minus 1) */
-    if (ctl->keep || ctl->fetchall)
+    if (!peek_capable)
        gen_send(sock, "RETR %d", number);
     else
        gen_send(sock, "TOP %d 99999999", number);