diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-05-21 21:48:02 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-05-21 21:48:02 +0000 |
commit | de5194eeaad226bee702fbe5170bde2c476933dd (patch) | |
tree | b4a4f8c495c47200ff0e86e16bef96001461ce91 /src/or/dns.c | |
parent | 60c2dced989fefdb8447b068d86dea70d24b2962 (diff) | |
download | tor-de5194eeaad226bee702fbe5170bde2c476933dd.tar.gz tor-de5194eeaad226bee702fbe5170bde2c476933dd.zip |
r13025@Kushana: nickm | 2007-05-21 17:40:56 -0400
Bugfix and possible backport candidate: use the same logic as in read_all when reading resolv.conf. Maybe this fixes bug 433.
svn:r10237
Diffstat (limited to 'src/or/dns.c')
-rw-r--r-- | src/or/dns.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index 7cf6f9fad4..588389ae18 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -1054,6 +1054,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 @@ -1078,9 +1079,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) { |