aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-08-04 13:59:02 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-08-04 13:59:02 +0000
commit0fac6a743ae2f6fc7664743918f7b5777644b106 (patch)
tree5bdc6b612b5a295be7bdda95dd23999bb9b0ea6f /fetchmail.c
parent4fe1884292376b223d3dee76b194a47e90323541 (diff)
downloadfetchmail-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.c25
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;