aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-05-05 18:52:53 -0400
committerNick Mathewson <nickm@torproject.org>2013-05-05 18:52:53 -0400
commit139d367f297575a59b96b64a633ed2b6988d60e1 (patch)
tree2ee44274bcabd04c2f03641ab8c1829b1341c283 /src/or/dirserv.c
parentf8bb0064d6a06770e6187ba57a2f4a764336aa84 (diff)
downloadtor-139d367f297575a59b96b64a633ed2b6988d60e1.tar
tor-139d367f297575a59b96b64a633ed2b6988d60e1.tar.gz
Fix 8833: crash bug from using NULL node->ri in dirserv.c
It appears that moria1 crashed because of one instance of this (the one in router_counts_toward_thresholds). The other instance I fixed won't actually have broken anything, but I think it's more clear this way. Fixes bug 8833; bugfix on 0.2.4.12-alpha.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 66a2c14f8..16f297a80 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1889,7 +1889,7 @@ router_counts_toward_thresholds(const node_t *node, time_t now,
{
/* Have measured bw? */
int have_mbw =
- dirserv_has_measured_bw(node->ri->cache_info.identity_digest);
+ dirserv_has_measured_bw(node->identity);
uint64_t min_bw_kb = ABSOLUTE_MIN_BW_VALUE_TO_CONSIDER_KB;
const or_options_t *options = get_options();
@@ -1959,7 +1959,7 @@ dirserv_compute_performance_thresholds(routerlist_t *rl,
if (router_counts_toward_thresholds(node, now, omit_as_sybil,
require_mbw)) {
routerinfo_t *ri = node->ri;
- const char *id = ri->cache_info.identity_digest;
+ const char *id = node->identity;
uint32_t bw_kb;
node->is_exit = (!router_exit_policy_rejects_all(ri) &&
exit_policy_is_general_exit(ri->exit_policy));