aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2004-11-08 09:32:01 +0000
committerMatthias Andree <matthias.andree@gmx.de>2004-11-08 09:32:01 +0000
commit6d7bc49daac142b273223c72ca9249921fe568b8 (patch)
treeeba19693f719dd36d151f4827780da0b913566cb
parent4ecd6abb6a88e17d6bf2af382c06d9d446eccff6 (diff)
downloadfetchmail-6d7bc49daac142b273223c72ca9249921fe568b8.tar.gz
fetchmail-6d7bc49daac142b273223c72ca9249921fe568b8.tar.bz2
fetchmail-6d7bc49daac142b273223c72ca9249921fe568b8.zip
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
-rw-r--r--NEWS2
-rw-r--r--fetchmail.c19
2 files changed, 12 insertions, 9 deletions
diff --git a/NEWS b/NEWS
index 26f4a3cc..cfabb900 100644
--- a/NEWS
+++ b/NEWS
@@ -28,6 +28,8 @@
* Normalize most locale codesets to IANA codesets, based on
norm_charmap.c by Markus Kuhn. (Matthias Andree)
* Remove sleep(3) after POP3 login, patch by Brian Candler.
+* Fix option parsing bug that trashes the showdots setting when more
+ than one server is configured. Patch by Brian Candler.
fetchmail-6.2.5 (Wed Oct 15 18:39:22 EDT 2003), 23079 lines:
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
/*