diff options
author | Roger Dingledine <arma@torproject.org> | 2004-03-28 04:54:36 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-03-28 04:54:36 +0000 |
commit | f241fdfc739c08779603f2590e484ba1e405867a (patch) | |
tree | 67d85bae0650d90f8e43439b7a2a6428574730a7 /src/or/dns.c | |
parent | df57d3ff3a51e863a133e3bdbc6ecaa0be7f6e7e (diff) | |
download | tor-f241fdfc739c08779603f2590e484ba1e405867a.tar.gz tor-f241fdfc739c08779603f2590e484ba1e405867a.zip |
there is yet another dns-pending-conn-clobbering bug
somewhere
svn:r1354
Diffstat (limited to 'src/or/dns.c')
-rw-r--r-- | src/or/dns.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index 61aa55458c..ebe52e2dbf 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -237,6 +237,19 @@ void connection_dns_remove(connection_t *conn) } } +void assert_connection_edge_not_dns_pending(connection_t *conn) { + struct pending_connection_t *pend; + struct cached_resolve *resolve; + + SPLAY_FOREACH(resolve, cache_tree, &cache_root) { + for(pend = resolve->pending_connections; + pend; + pend = pend->next) { + assert(pend->conn != conn); + } + } +} + /* Cancel all pending connections. Then cancel the resolve itself, * and remove the 'struct cached_resolve' from the cache. */ |