Commit 67b775bc authored by Nick Mathewson's avatar Nick Mathewson 🌉
Browse files

r7397@Kushana: nickm | 2006-08-15 00:46:18 -0400

 Fix eventdns version of dns.c. Man, we need to get rid of this eventdns/dnsworker split.


svn:r7064
parent 7bfb2cf4
...@@ -107,8 +107,8 @@ static int spawn_enough_dnsworkers(void); ...@@ -107,8 +107,8 @@ static int spawn_enough_dnsworkers(void);
#else #else
static int configure_nameservers(void); static int configure_nameservers(void);
#endif #endif
static void _assert_cache_ok(void);
#ifdef DEBUG_DNS_CACHE #ifdef DEBUG_DNS_CACHE
static void _assert_cache_ok(void);
#define assert_cache_ok() _assert_cache_ok() #define assert_cache_ok() _assert_cache_ok()
#else #else
#define assert_cache_ok() do {} while(0) #define assert_cache_ok() do {} while(0)
...@@ -1186,7 +1186,7 @@ configure_nameservers(void) ...@@ -1186,7 +1186,7 @@ configure_nameservers(void)
{ {
or_options_t *options; or_options_t *options;
if (nameservers_configured) if (nameservers_configured)
return; return 0;
options = get_options(); options = get_options();
eventdns_set_log_fn(eventdns_log_cb); eventdns_set_log_fn(eventdns_log_cb);
if (options->Nameservers && smartlist_len(options->Nameservers)) { if (options->Nameservers && smartlist_len(options->Nameservers)) {
...@@ -1230,6 +1230,7 @@ configure_nameservers(void) ...@@ -1230,6 +1230,7 @@ configure_nameservers(void)
#endif #endif
} }
nameservers_configured = 1; nameservers_configured = 1;
return 0;
} }
static void static void
eventdns_callback(int result, char type, int count, int ttl, void *addresses, eventdns_callback(int result, char type, int count, int ttl, void *addresses,
...@@ -1311,6 +1312,7 @@ assert_resolve_ok(cached_resolve_t *resolve) ...@@ -1311,6 +1312,7 @@ assert_resolve_ok(cached_resolve_t *resolve)
} }
} }
#ifdef DEBUG_DNS_CACHE
static void static void
_assert_cache_ok(void) _assert_cache_ok(void)
{ {
...@@ -1331,4 +1333,4 @@ _assert_cache_ok(void) ...@@ -1331,4 +1333,4 @@ _assert_cache_ok(void)
smartlist_pqueue_assert_ok(cached_resolve_pqueue, smartlist_pqueue_assert_ok(cached_resolve_pqueue,
_compare_cached_resolves_by_expiry); _compare_cached_resolves_by_expiry);
} }
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment