aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-06-05 15:38:53 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-06-05 15:38:53 +0000
commitaa35b2b5cc1f0d53fef2225d7bfd2e4092dbf03c (patch)
tree4e1f116201aa5335d603d359cadf5e627b28fbe4 /fetchmail.c
parent9a0a1798c33509defb2f51f8117be55cff6c0fc5 (diff)
downloadfetchmail-aa35b2b5cc1f0d53fef2225d7bfd2e4092dbf03c.tar.gz
fetchmail-aa35b2b5cc1f0d53fef2225d7bfd2e4092dbf03c.tar.bz2
fetchmail-aa35b2b5cc1f0d53fef2225d7bfd2e4092dbf03c.zip
Solve Marty Lee's bug.
svn path=/trunk/; revision=1912
Diffstat (limited to 'fetchmail.c')
-rw-r--r--fetchmail.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/fetchmail.c b/fetchmail.c
index 26db0e07..9b464355 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -791,6 +791,8 @@ static int load_params(int argc, char **argv, int optind)
else
for (; optind < argc; optind++)
{
+ flag predeclared = FALSE;
+
/*
* If hostname corresponds to a host known from the rc file,
* simply declare it active. Otherwise synthesize a host
@@ -799,18 +801,22 @@ static int load_params(int argc, char **argv, int optind)
for (ctl = querylist; ctl; ctl = ctl->next)
if (!strcmp(ctl->server.pollname, argv[optind])
|| str_in_list(&ctl->server.akalist, argv[optind], TRUE))
- goto foundit;
-
- /*
- * Allocate and link record without copying in command-line args;
- * we'll do that with the optmerge call later on.
- */
- ctl = hostalloc((struct query *)NULL);
- ctl->server.via =
- ctl->server.pollname = xstrdup(argv[optind]);
+ {
+ ctl->active = TRUE;
+ predeclared = TRUE;
+ }
- foundit:
- ctl->active = TRUE;
+ if (!predeclared)
+ {
+ /*
+ * Allocate and link record without copying in
+ * command-line args; we'll do that with the optmerge
+ * call later on.
+ */
+ ctl = hostalloc((struct query *)NULL);
+ ctl->server.via =
+ ctl->server.pollname = xstrdup(argv[optind]);
+ }
}
/*