From 7b11f0ff9972d8046e69f98948fdab26b5199caf Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 8 Nov 1996 16:44:22 +0000 Subject: Reset batchcount before each poll cycle. svn path=/trunk/; revision=514 --- driver.c | 3 +-- fetchmail.c | 1 + fetchmail.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/driver.c b/driver.c index 9b0aee0f..dd65f5e7 100644 --- a/driver.c +++ b/driver.c @@ -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 */ -- cgit v1.2.3