aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-02-13 17:48:02 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-02-13 17:48:02 +0000
commit76127bc2c6f9acd1aaa05b60179e702eee70e9ac (patch)
treeae1adaf515029c6f7c19bf35073a8d9a031c6630 /driver.c
parent563b31d0fdc97c1abc70a570a7c3f9733c4ef1b6 (diff)
downloadfetchmail-76127bc2c6f9acd1aaa05b60179e702eee70e9ac.tar.gz
fetchmail-76127bc2c6f9acd1aaa05b60179e702eee70e9ac.tar.bz2
fetchmail-76127bc2c6f9acd1aaa05b60179e702eee70e9ac.zip
Tony Nugent's fixes.
svn path=/trunk/; revision=876
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/driver.c b/driver.c
index c6a67b81..94711453 100644
--- a/driver.c
+++ b/driver.c
@@ -1284,6 +1284,8 @@ const struct method *proto; /* protocol method table */
}
else if (count > 0)
{
+ int force_retrieval, fetches;
+
/*
* What forces this code is that in POP3 and IMAP2BIS you can't
* fetch a message without having it marked `seen'. In IMAP4,
@@ -1306,9 +1308,9 @@ const struct method *proto; /* protocol method table */
* previous pass and forcing all messages to be considered new
* if it's nonzero.
*/
- int force_retrieval = !peek_capable && (ctl->errcount > 0);
+ force_retrieval = !peek_capable && (ctl->errcount > 0);
- ctl->errcount = 0;
+ ctl->errcount = fetches = 0;
/* read, forward, and delete messages */
for (num = 1; num <= count; num++)
@@ -1367,6 +1369,8 @@ const struct method *proto; /* protocol method table */
goto cleanUp;
vtalarm(ctl->server.timeout);
}
+
+ fetches++;
}
/*
@@ -1396,7 +1400,7 @@ const struct method *proto; /* protocol method table */
error_complete(0, 0, " not flushed");
/* perhaps this as many as we're ready to handle */
- if (ctl->fetchlimit && ctl->fetchlimit <= num)
+ if (ctl->fetchlimit && ctl->fetchlimit <= fetches)
break;
}