aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-05-28 20:41:37 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-05-28 20:41:37 +0000
commit93d237073e72102640dcf3442d1887d69776921c (patch)
treec64e4e542297d625dad8cd7921822fbd4dd8913e /fetchmail.c
parentd6fe2a5f48e069fe423b12f2e163589194115dc0 (diff)
downloadfetchmail-93d237073e72102640dcf3442d1887d69776921c.tar.gz
fetchmail-93d237073e72102640dcf3442d1887d69776921c.tar.bz2
fetchmail-93d237073e72102640dcf3442d1887d69776921c.zip
Added the interval option.
svn path=/trunk/; revision=1040
Diffstat (limited to 'fetchmail.c')
-rw-r--r--fetchmail.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/fetchmail.c b/fetchmail.c
index 9652dab3..8438c42e 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -750,6 +750,18 @@ 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.names->id);
+ return PS_NOMAIL;
+ }
+ }
+
if (outlevel == O_VERBOSE)
{
time_t now;
@@ -800,6 +812,9 @@ void dump_params (struct query *ctl)
printf(" Logfile is %s\n", logfile);
if (poll_interval)
printf(" Poll interval is %d seconds\n", poll_interval);
+ if (ctl->server.interval)
+ printf(" Poll of this server will occur every %d intervals.\n",
+ ctl->server.interval);
#ifdef HAVE_GETHOSTBYNAME
if (ctl->server.canonical_name)
printf(" Canonical DNS name of server is %s.\n", ctl->server.canonical_name);