aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-06-11 16:07:37 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-06-11 16:07:37 +0000
commit1db4207a5ffdc53bbc7cbaffe8d6f0b20bd9b030 (patch)
tree997f49b2b4a24f2691763db9533cd93abefe518d /driver.c
parent672bf0838ae4d00dc71020fa9e5a8b1b377ba045 (diff)
downloadfetchmail-1db4207a5ffdc53bbc7cbaffe8d6f0b20bd9b030.tar.gz
fetchmail-1db4207a5ffdc53bbc7cbaffe8d6f0b20bd9b030.tar.bz2
fetchmail-1db4207a5ffdc53bbc7cbaffe8d6f0b20bd9b030.zip
Put in Dave Holland's feature.
svn path=/trunk/; revision=1089
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/driver.c b/driver.c
index 20dd4a49..46cd22ae 100644
--- a/driver.c
+++ b/driver.c
@@ -360,7 +360,7 @@ int smtp_open(struct query *ctl)
struct idlist *idp;
/* maybe it's time to close the socket in order to force delivery */
- if (ctl->batchlimit && (ctl->smtp_socket != -1) && batchcount++ == ctl->batchlimit)
+ if (ctl->batchlimit > 0 && (ctl->smtp_socket != -1) && batchcount++ == ctl->batchlimit)
{
close(ctl->smtp_socket);
ctl->smtp_socket = -1;
@@ -1401,7 +1401,7 @@ const struct method *proto; /* protocol method table */
* remove the `&& ctl->limit' here.
*/
msgsizes = (int *)NULL;
- if (!ctl->fetchall && proto->getsizes && ctl->limit)
+ if (proto->getsizes && ctl->limit > 0)
{
msgsizes = (int *)alloca(sizeof(int) * count);
@@ -1449,9 +1449,10 @@ const struct method *proto; /* protocol method table */
/* read, forward, and delete messages */
for (num = 1; num <= count; num++)
{
- bool toolarge = msgsizes && (msgsizes[num-1] > ctl->limit);
- bool fetch_it = ctl->fetchall ||
- (!toolarge && (force_retrieval || !(protocol->is_old && (protocol->is_old)(sock,ctl,num))));
+ bool toolarge = (ctl->limit > 0)
+ && msgsizes && (msgsizes[num-1] > ctl->limit);
+ bool fetch_it = !toolarge
+ && (ctl->fetchall || force_retrieval || !(protocol->is_old && (protocol->is_old)(sock,ctl,num)));
bool suppress_delete = FALSE;
bool suppress_forward = FALSE;
@@ -1624,7 +1625,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 <= fetches)
+ if (ctl->fetchlimit > 0 && ctl->fetchlimit <= fetches)
goto no_error;
}
}