diff options
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; |