diff options
author | Roger Dingledine <arma@torproject.org> | 2006-04-04 03:46:40 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-04-04 03:46:40 +0000 |
commit | c4fb9d22cf815e050d7b1ee8d16e4218014a34cc (patch) | |
tree | f58bfc0909a56dd1752f0a9fc19842686c09213f | |
parent | 0825f61102242af15d99f3083e45db24471b8260 (diff) | |
download | tor-c4fb9d22cf815e050d7b1ee8d16e4218014a34cc.tar.gz tor-c4fb9d22cf815e050d7b1ee8d16e4218014a34cc.zip |
if there's more than one match for router-get-my-nickname,
try to pick one that's running.
svn:r6313
-rw-r--r-- | src/or/routerlist.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 2cb3dd2e0f..2873e1d742 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -944,7 +944,8 @@ router_get_by_nickname(const char *nickname, int warn_if_unnamed) return router; else { ++n_matches; - best_match = router; + if (n_matches <= 1 || router->is_running) + best_match = router; } } else if (maybedigest && !memcmp(digest, router->cache_info.identity_digest, DIGEST_LEN) |