From 76127bc2c6f9acd1aaa05b60179e702eee70e9ac Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 13 Feb 1997 17:48:02 +0000 Subject: Tony Nugent's fixes. svn path=/trunk/; revision=876 --- driver.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'driver.c') 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; } -- cgit v1.2.3