summaryrefslogtreecommitdiff
path: root/ares_init.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-11-22 22:54:41 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-11-22 22:54:41 +0000
commit6a59182e81ad9186699ec6931e5a40851fce0df0 (patch)
treeb8455c4b1b3b3058cd019a9b0ccab7b8f2261b7a /ares_init.c
parentbc76d02bc32e35ea544821919e07f22346314f7a (diff)
downloadc-ares-6a59182e81ad9186699ec6931e5a40851fce0df0.tar.gz
c-ares-6a59182e81ad9186699ec6931e5a40851fce0df0.tar.bz2
c-ares-6a59182e81ad9186699ec6931e5a40851fce0df0.zip
Michael Wallner fixed this problem: When I set domains in the options
struct, and there are domain/search entries in /etc/resolv.conf, the domains of the options struct will be overridden.
Diffstat (limited to 'ares_init.c')
-rw-r--r--ares_init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ares_init.c b/ares_init.c
index 7246bc4..e32633f 100644
--- a/ares_init.c
+++ b/ares_init.c
@@ -592,11 +592,11 @@ DhcpNameServer
return (errno == ENOENT) ? ARES_SUCCESS : ARES_EFILE;
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
{
- if ((p = try_config(line, "domain")))
+ if ((p = try_config(line, "domain")) && channel->ndomains == -1)
status = config_domain(channel, p);
else if ((p = try_config(line, "lookup")) && !channel->lookups)
status = config_lookup(channel, p, "bind", "file");
- else if ((p = try_config(line, "search")))
+ else if ((p = try_config(line, "search")) && channel->ndomains == -1)
status = set_search(channel, p);
else if ((p = try_config(line, "nameserver")) && channel->nservers == -1)
status = config_nameserver(&servers, &nservers, p);