diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/or/dns.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index c5ef7befe..e868b1207 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -107,7 +107,12 @@ static int spawn_enough_dnsworkers(void); #else static void configure_nameservers(void); #endif -static void assert_cache_ok(void); +static void _assert_cache_ok(void); +#ifdef DEBUG_DNS_CACHE +#define assert_cache_ok() _assert_cache_ok() +#else +#define assert_cache_ok() do {} while(0) +#endif static void assert_resolve_ok(cached_resolve_t *resolve); /** Hash table of cached_resolve objects. */ @@ -1285,7 +1290,7 @@ assert_resolve_ok(cached_resolve_t *resolve) } static void -assert_cache_ok(void) +_assert_cache_ok(void) { cached_resolve_t **resolve; int bad_rep = _cache_map_HT_REP_IS_BAD(&cache_root); |