From 05bab55b974d83944871d50fd3ddcf4c4255b5e3 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Wed, 13 Oct 2004 21:15:02 +0000 Subject: [PATCH] backport patch from pre1: Fix a rare assert trigger, where routerinfos for entries in our cpath would expire while we're building the path. svn:r2472 --- branches/tor-0_0_8-patches/src/or/circuitbuild.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/branches/tor-0_0_8-patches/src/or/circuitbuild.c b/branches/tor-0_0_8-patches/src/or/circuitbuild.c index 12b2afe908..d758af81be 100644 --- a/branches/tor-0_0_8-patches/src/or/circuitbuild.c +++ b/branches/tor-0_0_8-patches/src/or/circuitbuild.c @@ -1079,9 +1079,9 @@ static routerinfo_t *choose_good_middle_server(cpath_build_state_t *state, 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);