[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Fix a rare assert trigger, where routerinfos for entries in...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] Fix a rare assert trigger, where routerinfos for entries in...
- From: arma@seul.org (Roger Dingledine)
- Date: Thu, 30 Sep 2004 11:40:08 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Thu, 30 Sep 2004 11:40:25 -0400
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
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);