mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
r19138@catbus: nickm | 2008-03-30 11:59:26 -0400
oops; fix bug in descriptor metric logic. svn:r14245
This commit is contained in:
parent
3b0be16e3b
commit
72ca7e5d88
@ -2265,17 +2265,25 @@ dump_routerlist_mem_usage(int severity)
|
||||
char last_valid_until[ISO_TIME_LEN+1];
|
||||
char last_served_at[ISO_TIME_LEN+1];
|
||||
char id[HEX_DIGEST_LEN+1];
|
||||
routerstatus_t *rs;
|
||||
format_iso_time(published, sd->published_on);
|
||||
format_iso_time(last_valid_until, sd->last_listed_as_valid_until);
|
||||
format_iso_time(last_served_at, sd->last_served_at);
|
||||
base16_encode(id, sizeof(id), sd->identity_digest, DIGEST_LEN);
|
||||
SMARTLIST_FOREACH(networkstatus_v2_list, networkstatus_v2_t *, ns,
|
||||
if (networkstatus_v2_find_entry(ns, sd->identity_digest)) {
|
||||
in_v2 = 1; break;
|
||||
{
|
||||
rs = networkstatus_v2_find_entry(ns, sd->identity_digest);
|
||||
if (rs && !memcmp(rs->descriptor_digest,
|
||||
sd->signed_descriptor_digest, DIGEST_LEN)) {
|
||||
in_v2 = 1; break;
|
||||
}
|
||||
});
|
||||
if (consensus && networkstatus_vote_find_entry(consensus,
|
||||
sd->identity_digest))
|
||||
in_v3 = 1;
|
||||
if (consensus) {
|
||||
rs = networkstatus_vote_find_entry(consensus, sd->identity_digest);
|
||||
if (rs && !memcmp(rs->descriptor_digest,
|
||||
sd->signed_descriptor_digest, DIGEST_LEN))
|
||||
in_v3 = 1;
|
||||
}
|
||||
log(severity, LD_DIR,
|
||||
"Old descriptor for %s (published %s) %sin v2 ns, %sin v3 "
|
||||
"consensus. Last valid until %s; last served at %s.",
|
||||
|
Loading…
Reference in New Issue
Block a user