diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2010-10-14 17:49:51 +0200 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2010-10-14 17:49:51 +0200 |
commit | 4556f2e7c80274932019a239232235ce571c98f8 (patch) | |
tree | 28ce37b8f5646490ab73d663bf8f884ad185d3d5 /src/or/routerlist.c | |
parent | 376939c9acfe64b1722ef184fda0ef0235e14a7d (diff) | |
download | tor-4556f2e7c80274932019a239232235ce571c98f8.tar.gz tor-4556f2e7c80274932019a239232235ce571c98f8.zip |
Rename router_get_by_digest()
We now call the function router_get_by_id_digest() to make clear that
we're talking about the identity digest here, not descriptor digest.
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r-- | src/or/routerlist.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 449d558af5..816cfadf33 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -2462,7 +2462,7 @@ router_get_by_nickname(const char *nickname, int warn_if_unnamed) int router_digest_version_as_new_as(const char *digest, const char *cutoff) { - const routerinfo_t *router = router_get_by_digest(digest); + const routerinfo_t *router = router_get_by_id_digest(digest); if (!router) return 1; return tor_version_as_new_as(router->platform, cutoff); @@ -2526,7 +2526,7 @@ router_get_by_hexdigest(const char *hexdigest) return router_get_by_nickname(hexdigest, 1); } -/** As router_get_by_digest,but return a pointer that you're allowed to +/** As router_get_by_id_digest,but return a pointer that you're allowed to * modify */ routerinfo_t * router_get_mutable_by_digest(const char *digest) @@ -2543,7 +2543,7 @@ router_get_mutable_by_digest(const char *digest) /** Return the router in our routerlist whose 20-byte key digest * is <b>digest</b>. Return NULL if no such router is known. */ const routerinfo_t * -router_get_by_digest(const char *digest) +router_get_by_id_digest(const char *digest) { return router_get_mutable_by_digest(digest); } @@ -4610,7 +4610,7 @@ update_consensus_router_descriptor_downloads(time_t now, int is_vote, if ((sd = router_get_by_descriptor_digest(rs->descriptor_digest))) { const routerinfo_t *ri; ++n_have; - if (!(ri = router_get_by_digest(rs->identity_digest)) || + if (!(ri = router_get_by_id_digest(rs->identity_digest)) || memcmp(ri->cache_info.signed_descriptor_digest, sd->signed_descriptor_digest, DIGEST_LEN)) { /* We have a descriptor with this digest, but either there is no @@ -4644,7 +4644,7 @@ update_consensus_router_descriptor_downloads(time_t now, int is_vote, char time_bufnew[ISO_TIME_LEN+1]; char time_bufold[ISO_TIME_LEN+1]; const routerinfo_t *oldrouter; - oldrouter = router_get_by_digest(rs->identity_digest); + oldrouter = router_get_by_id_digest(rs->identity_digest); format_iso_time(time_bufnew, rs->published_on); if (oldrouter) format_iso_time(time_bufold, oldrouter->cache_info.published_on); @@ -4765,7 +4765,7 @@ update_extrainfo_downloads(time_t now) sd = &((routerinfo_t*)smartlist_get(lst, i))->cache_info; if (sd->is_extrainfo) continue; /* This should never happen. */ - if (old_routers && !router_get_by_digest(sd->identity_digest)) + if (old_routers && !router_get_by_id_digest(sd->identity_digest)) continue; /* Couldn't check the signature if we got it. */ if (sd->extrainfo_is_bogus) continue; |