From 6d7bc49daac142b273223c72ca9249921fe568b8 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Mon, 8 Nov 2004 09:32:01 +0000 Subject: Fix showdots parsing bug that maps preliminary to final flag values twice, trashing the setting when more than one server is configured. Patch submitted by Brian Candler. svn path=/trunk/; revision=3985 --- fetchmail.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'fetchmail.c') diff --git a/fetchmail.c b/fetchmail.c index 07ca6eb8..d0208711 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -1065,6 +1065,16 @@ static int load_params(int argc, char **argv, int optind) break; } + /* this code enables flags to be turned off */ +#define DEFAULT(flag, dflt) if (flag == FLAG_TRUE)\ + flag = TRUE;\ + else if (flag == FLAG_FALSE)\ + flag = FALSE;\ + else\ + flag = (dflt) + /* one global gets treated specially */ + DEFAULT(run.showdots, run.poll_interval==0 || nodetach); + /* merge in wired defaults, do sanity checks and prepare internal fields */ for (ctl = querylist; ctl; ctl = ctl->next) { @@ -1094,13 +1104,6 @@ static int load_params(int argc, char **argv, int optind) if (configdump || ctl->active ) { - /* this code enables flags to be turned off */ -#define DEFAULT(flag, dflt) if (flag == FLAG_TRUE)\ - flag = TRUE;\ - else if (flag == FLAG_FALSE)\ - flag = FALSE;\ - else\ - flag = (dflt) DEFAULT(ctl->keep, FALSE); DEFAULT(ctl->fetchall, FALSE); DEFAULT(ctl->flush, FALSE); @@ -1126,8 +1129,6 @@ static int load_params(int argc, char **argv, int optind) exit(PS_SYNTAX); } #endif /* SSL_ENABLE */ - /* one global gets treated specially */ - DEFAULT(run.showdots, run.poll_interval==0 || nodetach); #undef DEFAULT /* -- cgit v1.2.3