summaryrefslogtreecommitdiff
path: root/src/or/dns.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-05-22 01:39:31 +0000
committerNick Mathewson <nickm@torproject.org>2007-05-22 01:39:31 +0000
commit1837b5670ffdce778df0d97d3b0a922a6d2aec63 (patch)
treeaffeee8d8d815cede3e2c1d09279abc241635fd3 /src/or/dns.c
parent993c4973250f3f14135199714f8f243629c3c09b (diff)
downloadtor-1837b5670ffdce778df0d97d3b0a922a6d2aec63.tar.gz
tor-1837b5670ffdce778df0d97d3b0a922a6d2aec63.zip
r12840@catbus: nickm | 2007-05-21 21:39:23 -0400
Backport 10237: use the same logic as in read_all when reading resolv.conf. Maybe this fixes bug 433. svn:r10243
Diffstat (limited to 'src/or/dns.c')
-rw-r--r--src/or/dns.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/dns.c b/src/or/dns.c
index 47f833c4be..037805a9e8 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -1519,6 +1519,7 @@ configure_nameservers(int force)
or_options_t *options;
const char *conf_fname;
struct stat st;
+ int r;
options = get_options();
conf_fname = options->ServerDNSResolvConfFile;
#ifndef MS_WINDOWS
@@ -1543,9 +1544,9 @@ configure_nameservers(int force)
evdns_clear_nameservers_and_suspend();
}
log_info(LD_EXIT, "Parsing resolver configuration in '%s'", conf_fname);
- if (evdns_resolv_conf_parse(DNS_OPTIONS_ALL, conf_fname)) {
- log_warn(LD_EXIT, "Unable to parse '%s', or no nameservers in '%s'",
- conf_fname, conf_fname);
+ if ((r = evdns_resolv_conf_parse(DNS_OPTIONS_ALL, conf_fname))) {
+ log_warn(LD_EXIT, "Unable to parse '%s', or no nameservers in '%s' (%d)",
+ conf_fname, conf_fname, r);
return -1;
}
if (evdns_count_nameservers() == 0) {