1
0
mirror of https://frontier.innolan.net/rainlance/c-ares.git synced 2025-10-06 06:59:25 +00:00

ares_init: Last, not first instance of domain or search should win

This commit is contained in:
Jakub Hrozek
2010-05-31 16:32:54 +02:00
committed by Daniel Stenberg
parent 0e8dc6f18e
commit 125b1a8619
3 changed files with 27 additions and 3 deletions

View File

@ -839,11 +839,11 @@ DhcpNameServer
if (fp) {
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
{
if ((p = try_config(line, "domain")) && channel->ndomains == -1)
if ((p = try_config(line, "domain")))
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")) && channel->ndomains == -1)
else if ((p = try_config(line, "search")))
status = set_search(channel, p);
else if ((p = try_config(line, "nameserver")) && channel->nservers == -1)
status = config_nameserver(&servers, &nservers, p);