aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-12-11 23:17:06 +0000
committerNick Mathewson <nickm@torproject.org>2007-12-11 23:17:06 +0000
commit9a3597c418e27f5552bd0ea8f7d3bb128c1faf86 (patch)
tree786785d50574152db4f4e7e5fbeb549bb2a9607c /src
parent1acfe321f86098df2ca712e550e7876c741a3da6 (diff)
downloadtor-9a3597c418e27f5552bd0ea8f7d3bb128c1faf86.tar.gz
tor-9a3597c418e27f5552bd0ea8f7d3bb128c1faf86.zip
r17095@catbus: nickm | 2007-12-11 18:11:13 -0500
Backport r12766: Patch from mwenge: fix consensus status lookup by nickname when nickname is a hexdigest. svn:r12770
Diffstat (limited to 'src')
-rw-r--r--src/or/routerlist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 9ef41cefb4..19efac7e90 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -2845,11 +2845,11 @@ router_get_combined_status_by_nickname(const char *nickname,
return NULL;
if (nickname[0] == '$') {
- if (base16_decode(digest, DIGEST_LEN, nickname+1, strlen(nickname))<0)
+ if (base16_decode(digest, DIGEST_LEN, nickname+1, strlen(nickname+1))<0)
return NULL;
return router_get_combined_status_by_digest(digest);
} else if (strlen(nickname) == HEX_DIGEST_LEN &&
- (base16_decode(digest, DIGEST_LEN, nickname+1, strlen(nickname))==0)) {
+ (base16_decode(digest, DIGEST_LEN, nickname, strlen(nickname))==0)) {
return router_get_combined_status_by_digest(digest);
}