[or-cvs] These asserts will either cause spurious crashes or help de...

Nick Mathewson nickm at seul.org
Fri Jul 21 22:03:00 UTC 2006


Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv25560/src/or

Modified Files:
	dns.c 
Log Message:
These asserts will either cause spurious crashes or help debug the pend->conn->s == -1 issue.

Index: dns.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/dns.c,v
retrieving revision 1.198
retrieving revision 1.199
diff -u -p -d -r1.198 -r1.199
--- dns.c	15 Jul 2006 19:21:30 -0000	1.198
+++ dns.c	21 Jul 2006 22:02:58 -0000	1.199
@@ -551,6 +551,7 @@ dns_cancel_pending_resolve(char *address
     pend = resolve->pending_connections;
     pend->conn->state = EXIT_CONN_STATE_RESOLVEFAILED;
     pendconn = pend->conn;
+    assert_connection_ok(pendconn, 0);
     tor_assert(pendconn->s == -1);
     if (!pendconn->marked_for_close) {
       connection_edge_end(pendconn, END_STREAM_REASON_RESOURCELIMIT,
@@ -726,6 +727,7 @@ assign_to_dnsworker(connection_t *exitco
   unsigned char len;
 
   tor_assert(exitconn->state == EXIT_CONN_STATE_RESOLVING);
+  assert_connection_ok(exitconn, 0);
   tor_assert(exitconn->s == -1);
 
   /* respawn here, to be sure there are enough */
@@ -1200,7 +1202,6 @@ assert_resolve_ok(cached_resolve_t *reso
   tor_assert(resolve->magic == CACHED_RESOLVE_MAGIC);
   tor_assert(strlen(resolve->address) < MAX_ADDRESSLEN);
   tor_assert(! resolve->next || resolve->next->magic == CACHED_RESOLVE_MAGIC);
-
 }
 
 static void



More information about the tor-commits mailing list