diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-08-04 13:59:02 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-08-04 13:59:02 +0000 |
commit | 0fac6a743ae2f6fc7664743918f7b5777644b106 (patch) | |
tree | 5bdc6b612b5a295be7bdda95dd23999bb9b0ea6f /fetchmail.c | |
parent | 4fe1884292376b223d3dee76b194a47e90323541 (diff) | |
download | fetchmail-0fac6a743ae2f6fc7664743918f7b5777644b106.tar.gz fetchmail-0fac6a743ae2f6fc7664743918f7b5777644b106.tar.bz2 fetchmail-0fac6a743ae2f6fc7664743918f7b5777644b106.zip |
Interval cleanup.
svn path=/trunk/; revision=1227
Diffstat (limited to 'fetchmail.c')
-rw-r--r-- | fetchmail.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/fetchmail.c b/fetchmail.c index 715e7246..dacf254b 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -350,6 +350,19 @@ int main (int argc, char **argv) { if (ctl->active && !(implicitmode && ctl->server.skip)) { + /* check skip interval first so that it counts all polls */ + if (poll_interval && ctl->server.interval) + { + if (ctl->server.poll_count++ % ctl->server.interval) + { + if (outlevel == O_VERBOSE) + fprintf(stderr, + "fetchmail: interval not reached, not querying %s\n", + ctl->server.pollname); + continue; + } + } + #ifdef linux /* interface_approve() does its own error logging */ if (!interface_approve(&ctl->server)) @@ -740,18 +753,6 @@ static int query_host(struct query *ctl) { int i, st; - if (poll_interval && ctl->server.interval) - { - if (ctl->server.poll_count++ % ctl->server.interval) - { - if (outlevel == O_VERBOSE) - fprintf(stderr, - "fetchmail: interval not reached, not querying %s\n", - ctl->server.pollname); - return PS_NOMAIL; - } - } - if (outlevel == O_VERBOSE) { time_t now; |