aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-10-13 19:17:27 +0000
committerNick Mathewson <nickm@torproject.org>2004-10-13 19:17:27 +0000
commitafd8b650eea2f78beaa01093edbf0de25c711d38 (patch)
tree3ba3f057e5afb2365640ade5ab6546aee0e532e8 /src/or
parentdf3098367cd4e17411310bece45fc2991a90b039 (diff)
downloadtor-afd8b650eea2f78beaa01093edbf0de25c711d38.tar
tor-afd8b650eea2f78beaa01093edbf0de25c711d38.tar.gz
hex-to-hex compare makes more sense than hex-to-bin.
svn:r2463
Diffstat (limited to 'src/or')
-rw-r--r--src/or/dirserv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 3f2032822..862862596 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -188,12 +188,14 @@ dirserv_router_fingerprint_is_known(const routerinfo_t *router)
* return that router's nickname. Otherwise return NULL. */
const char *dirserv_get_nickname_by_digest(const char *digest)
{
+ char hexdigest[HEX_DIGEST_LEN+1];
if (!fingerprint_list)
return NULL;
tor_assert(digest);
+ base16_encode(hexdigest, HEX_DIGEST_LEN+1, digest, DIGEST_LEN);
SMARTLIST_FOREACH(fingerprint_list, fingerprint_entry_t*, ent,
- { if (!strcasecmp(digest, ent->fingerprint))
+ { if (!strcasecmp(hexdigest, ent->fingerprint))
return ent->nickname; } );
return NULL;
}