]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Remove assert_all_pending_dns_resolves_ok().
authorNick Mathewson <nickm@torproject.org>
Wed, 19 Feb 2020 17:27:49 +0000 (12:27 -0500)
committerNick Mathewson <nickm@torproject.org>
Wed, 19 Feb 2020 17:27:49 +0000 (12:27 -0500)
It hasn't been used since 2009.

src/core/mainloop/mainloop.c
src/feature/relay/dns.c
src/feature/relay/dns.h

index 260de181e5ea1e98edb1546cbc9875d10af04acb..e4e17f6b7632c7d7336778dafe7560f08f025361 100644 (file)
@@ -966,7 +966,6 @@ conn_close_if_marked(int i)
     return 0; /* nothing to see here, move along */
   now = time(NULL);
   assert_connection_ok(conn, now);
-  /* assert_all_pending_dns_resolves_ok(); */
 
   log_debug(LD_NET,"Cleaning up connection (fd "TOR_SOCKET_T_FORMAT").",
             conn->s);
index 5f4bddab9db17529f12f6ed70050bcfce0eed03f..3ff1378df5dd5c4aa760463eff5c2ee10c825162 100644 (file)
@@ -971,25 +971,6 @@ assert_connection_edge_not_dns_pending(edge_connection_t *conn)
 #endif /* 1 */
 }
 
-/** Log an error and abort if any connection waiting for a DNS resolve is
- * corrupted. */
-void
-assert_all_pending_dns_resolves_ok(void)
-{
-  pending_connection_t *pend;
-  cached_resolve_t **resolve;
-
-  HT_FOREACH(resolve, cache_map, &cache_root) {
-    for (pend = (*resolve)->pending_connections;
-         pend;
-         pend = pend->next) {
-      assert_connection_ok(TO_CONN(pend->conn), 0);
-      tor_assert(!SOCKET_OK(pend->conn->base_.s));
-      tor_assert(!connection_in_array(TO_CONN(pend->conn)));
-    }
-  }
-}
-
 /** Remove <b>conn</b> from the list of connections waiting for conn-\>address.
  */
 void
index 70abaf138bd5898ec0656a1466a5bf93477991e6..462cc6361d1474a58e5699580d915ef4359ae928 100644 (file)
@@ -19,7 +19,6 @@ int has_dns_init_failed(void);
 int dns_reset(void);
 void connection_dns_remove(edge_connection_t *conn);
 void assert_connection_edge_not_dns_pending(edge_connection_t *conn);
-void assert_all_pending_dns_resolves_ok(void);
 MOCK_DECL(void,dns_cancel_pending_resolve,(const char *question));
 int dns_resolve(edge_connection_t *exitconn);
 int dns_seems_to_be_broken(void);