aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-05-17 02:11:34 -0400
committerNick Mathewson <nickm@torproject.org>2009-05-17 02:11:34 -0400
commit14a549552a6f2d05db7eed0cf2f2d277df8bc79c (patch)
tree978a3308d0e86002db2a5b62273a9fc53d3a4486 /src/or
parent87f7059dbc7568bb788364693a3c6468079f0647 (diff)
parent2fa54102188b70b9899035250a9f7c26b843fc91 (diff)
downloadtor-14a549552a6f2d05db7eed0cf2f2d277df8bc79c.tar.gz
tor-14a549552a6f2d05db7eed0cf2f2d277df8bc79c.zip
Merge branch 'maint-0.2.1' into merge_tmp
Diffstat (limited to 'src/or')
-rw-r--r--src/or/router.c3
-rw-r--r--src/or/routerlist.c7
2 files changed, 4 insertions, 6 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 45ea18b14f..da922b7508 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -330,9 +330,6 @@ load_authority_keyset(int legacy, crypto_pk_env_t **key_out,
"certificate");
goto done;
}
- parsed->cache_info.signed_descriptor_body = cert;
- parsed->cache_info.signed_descriptor_len = eos-cert;
- cert = NULL;
if (*key_out)
crypto_free_pk_env(*key_out);
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index c6bfca4546..de38e354e0 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -3513,6 +3513,7 @@ router_load_routers_from_string(const char *s, const char *eos,
SMARTLIST_FOREACH_BEGIN(routers, routerinfo_t *, ri) {
was_router_added_t r;
+ char d[DIGEST_LEN];
if (requested_fingerprints) {
base16_encode(fp, sizeof(fp), descriptor_digests ?
ri->cache_info.signed_descriptor_digest :
@@ -3533,6 +3534,7 @@ router_load_routers_from_string(const char *s, const char *eos,
}
}
+ memcpy(d, ri->cache_info.signed_descriptor_digest, DIGEST_LEN);
r = router_add_to_routerlist(ri, &msg, from_cache, !from_cache);
if (WRA_WAS_ADDED(r)) {
any_changed++;
@@ -3541,11 +3543,10 @@ router_load_routers_from_string(const char *s, const char *eos,
smartlist_clear(changed);
} else if (WRA_WAS_REJECTED(r)) {
download_status_t *dl_status;
- dl_status = router_get_dl_status_by_descriptor_digest(
- ri->cache_info.signed_descriptor_digest);
+ dl_status = router_get_dl_status_by_descriptor_digest(d);
if (dl_status) {
log_info(LD_GENERAL, "Marking router %s as never downloadable",
- hex_str(ri->cache_info.signed_descriptor_digest, DIGEST_LEN));
+ hex_str(d, DIGEST_LEN));
download_status_mark_impossible(dl_status);
}
}