[or-cvs] backport patch from pre1:

Roger Dingledine arma at seul.org
Wed Oct 13 21:15:04 UTC 2004


Update of /home2/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/0081/src/or

Modified Files:
      Tag: tor-0_0_8-patches
	circuitbuild.c 
Log Message:
backport patch from pre1:
Fix a rare assert trigger, where routerinfos for entries in our cpath
would expire while we're building the path.


Index: circuitbuild.c
===================================================================
RCS file: /home2/or/cvsroot/src/or/circuitbuild.c,v
retrieving revision 1.33
retrieving revision 1.33.2.1
diff -u -d -r1.33 -r1.33.2.1
--- circuitbuild.c	20 Aug 2004 21:34:36 -0000	1.33
+++ circuitbuild.c	13 Oct 2004 21:15:02 -0000	1.33.2.1
@@ -1079,9 +1079,9 @@
   if((r = routerlist_find_my_routerinfo()))
     smartlist_add(excluded, r);
   for (i = 0, cpath = head; i < cur_len; ++i, cpath=cpath->next) {
-    r = router_get_by_digest(cpath->identity_digest);
-    tor_assert(r);
-    smartlist_add(excluded, r);
+    if((r = router_get_by_digest(cpath->identity_digest))) {
+      smartlist_add(excluded, r);
+    }
   }
   choice = router_choose_random_node("", options.ExcludeNodes, excluded,
            0, 1, options._AllowUnverified & ALLOW_UNVERIFIED_MIDDLE, 0);



More information about the tor-commits mailing list