diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-02-02 18:58:04 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-02-02 18:58:04 +0000 |
commit | 07e6eecdb2df0b4130201c4252770724f74c642c (patch) | |
tree | c9b068a26c7b5467c0e215dc8c9481243eb48a3f /src/or/dns.c | |
parent | 85076992560c80502b81424eb08d876e61e0f068 (diff) | |
download | tor-07e6eecdb2df0b4130201c4252770724f74c642c.tar.gz tor-07e6eecdb2df0b4130201c4252770724f74c642c.zip |
r12122@Kushana: nickm | 2007-02-02 10:41:39 -0500
Fail when we are unable to parse the nameserver configuration.
svn:r9475
Diffstat (limited to 'src/or/dns.c')
-rw-r--r-- | src/or/dns.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index c86bd9c571..b7f27c64bb 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -222,8 +222,9 @@ dns_init(void) return 0; } -/** Called when DNS-related options change (or may have changed) */ -void +/** Called when DNS-related options change (or may have changed). Returns -1 + * on failure, 0 on success. */ +int dns_reset(void) { #ifdef USE_EVENTDNS @@ -236,8 +237,7 @@ dns_reset(void) resolv_conf_mtime = 0; } else { if (configure_nameservers(0) < 0) - /* XXXX012 */ - return; + return -1; } #else dnsworkers_rotate(); @@ -322,7 +322,8 @@ dns_free_all(void) SMARTLIST_FOREACH(cached_resolve_pqueue, cached_resolve_t *, res, { /* XXXX012 The hash lookups here could be quite slow; remove them - * once we're happy. */ + * once we're happy. (Leave them in for at least 0.1.2.7-alpha, so they + * get some testing.) -NM */ if (res->state == CACHE_STATE_DONE) { cached_resolve_t *found = HT_FIND(cache_map, &cache_root, res); tor_assert(!found || found != res); |