[or-cvs] Fix a rare assert trigger, where routerinfos for entries in...
Roger Dingledine
arma at seul.org
Thu Sep 30 15:40:08 UTC 2004
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
circuitbuild.c
Log Message:
Fix a rare assert trigger, where routerinfos for entries in our cpath
would expire while we're building the path.
Thanks to Eugene Armstead for pointing it out.
Index: circuitbuild.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuitbuild.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- circuitbuild.c 10 Sep 2004 21:40:28 -0000 1.34
+++ circuitbuild.c 30 Sep 2004 15:40:05 -0000 1.35
@@ -1083,10 +1083,10 @@
routerlist_add_friends(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);
- routerlist_add_friends(excluded, r);
+ if((r = router_get_by_digest(cpath->identity_digest))) {
+ smartlist_add(excluded, r);
+ routerlist_add_friends(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