diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-11-08 16:44:22 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-11-08 16:44:22 +0000 |
commit | 7b11f0ff9972d8046e69f98948fdab26b5199caf (patch) | |
tree | f21d513af3a323bd531c5a414ead70f63a23a445 | |
parent | 7579c3485f8850f8735e970d365486282a2303a3 (diff) | |
download | fetchmail-7b11f0ff9972d8046e69f98948fdab26b5199caf.tar.gz fetchmail-7b11f0ff9972d8046e69f98948fdab26b5199caf.tar.bz2 fetchmail-7b11f0ff9972d8046e69f98948fdab26b5199caf.zip |
Reset batchcount before each poll cycle.
svn path=/trunk/; revision=514
-rw-r--r-- | driver.c | 3 | ||||
-rw-r--r-- | fetchmail.c | 1 | ||||
-rw-r--r-- | fetchmail.h | 1 |
3 files changed, 3 insertions, 2 deletions
@@ -43,6 +43,7 @@ #define SMTP_PORT 25 /* standard SMTP service port */ int batchlimit; /* how often to tear down the delivery connection */ +int batchcount; /* count of messages sent in current batch */ static const struct method *protocol; static jmp_buf restart; @@ -205,8 +206,6 @@ static FILE *smtp_open(ctl) /* try to open a socket to the appropriate SMTP server for this query */ struct query *ctl; { - static int batchcount; - ctl = ctl->leader; /* go to the SMTP leader for this query */ /* maybe it's time to close the socket in order to force delivery */ diff --git a/fetchmail.c b/fetchmail.c index f591d3fb..9e88dce7 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -306,6 +306,7 @@ char **argv; sethostent(TRUE); /* use TCP/IP for mailserver queries */ #endif /* HAVE_RES_SEARCH */ + batchcount = 0; for (ctl = querylist; ctl; ctl = ctl->next) { if (ctl->active && !(implicitmode && ctl->skip)) diff --git a/fetchmail.h b/fetchmail.h index 49fa1ee1..785d7e17 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -139,6 +139,7 @@ extern char *logfile; /* log file for daemon mode */ extern int quitmode; /* if --quit was set */ extern int check_only; /* if --check was set */ extern int batchlimit; /* if --batchlimit was set */ +extern int batchcount; /* count of messages sent in current batch */ /* miscellaneous global controls */ extern char *rcfile; /* path name of rc file */ |