[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r7057: Stop walking entire dns cache for every request, now that we (in tor/trunk: . src/or)



Author: nickm
Date: 2006-08-14 16:16:21 -0400 (Mon, 14 Aug 2006)
New Revision: 7057

Modified:
   tor/trunk/
   tor/trunk/src/or/dns.c
Log:
 r7383@Kushana:  nickm | 2006-08-14 16:16:03 -0400
 Stop walking entire dns cache for every request, now that we found our hash table bug.



Property changes on: tor/trunk
___________________________________________________________________
Name: svk:merge
   - 17f730b7-d419-0410-b50f-85ee4b70197a:/local/or/tor/trunk:8290
1f724f9b-111a-0410-b636-93f1a77c1813:/local/or/tor/trunk:8207
96637b51-b116-0410-a10e-9941ebb49b64:/tor/branches/spec:7005
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/eventdns:7014
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/mmap:7030
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/oo-connections:6950
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/trans-ap:7315
c95137ef-5f19-0410-b913-86e773d04f59:/tor/trunk:7369
   + 17f730b7-d419-0410-b50f-85ee4b70197a:/local/or/tor/trunk:8290
1f724f9b-111a-0410-b636-93f1a77c1813:/local/or/tor/trunk:8207
96637b51-b116-0410-a10e-9941ebb49b64:/tor/branches/spec:7005
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/eventdns:7014
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/mmap:7030
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/oo-connections:6950
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/trans-ap:7315
c95137ef-5f19-0410-b913-86e773d04f59:/tor/trunk:7383

Modified: tor/trunk/src/or/dns.c
===================================================================
--- tor/trunk/src/or/dns.c	2006-08-14 11:48:47 UTC (rev 7056)
+++ tor/trunk/src/or/dns.c	2006-08-14 20:16:21 UTC (rev 7057)
@@ -107,7 +107,12 @@
 #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 @@
 }
 
 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);