diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2001-07-06 04:02:10 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2001-07-06 04:02:10 +0000 |
commit | 4922d88794d8fd93f7167359361d64ff3924d576 (patch) | |
tree | a974c3c7a07410810301c32525d74b26ba10162d /fetchmail.c | |
parent | 9efaf6e9906c97c30244293393239644416daa8b (diff) | |
download | fetchmail-4922d88794d8fd93f7167359361d64ff3924d576.tar.gz fetchmail-4922d88794d8fd93f7167359361d64ff3924d576.tar.bz2 fetchmail-4922d88794d8fd93f7167359361d64ff3924d576.zip |
Don't crap out when there are no servers.
svn path=/trunk/; revision=3402
Diffstat (limited to 'fetchmail.c')
-rw-r--r-- | fetchmail.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/fetchmail.c b/fetchmail.c index bac5a2f7..5b8c28ea 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -1180,6 +1180,7 @@ static int load_params(int argc, char **argv, int optind) memcpy(ctl->server.trueaddr, namerec->h_addr_list[0], namerec->h_length); + ctl->wedged = FALSE; } #else ctl->server.truename = xstrdup(ctl->server.queryname); @@ -1274,15 +1275,18 @@ static int load_params(int argc, char **argv, int optind) * If all connections are wedged due to DNS errors, quit. This is * important for the common case that you just have one connection. */ - st = PS_DNS; - for (ctl = querylist; ctl; ctl = ctl->next) - if (!ctl->wedged) - st = 0; - if (st == PS_DNS) + if (querylist) { - (void) fprintf(stderr, - _("all mailserver name lookups failed, exiting\n")); - exit(PS_DNS); + st = PS_DNS; + for (ctl = querylist; ctl; ctl = ctl->next) + if (!ctl->wedged) + st = 0; + if (st == PS_DNS) + { + (void) fprintf(stderr, + _("all mailserver name lookups failed, exiting\n")); + exit(PS_DNS); + } } return(implicitmode); |