if there's more than one match for router-get-my-nickname,

try to pick one that's running.


svn:r6313
This commit is contained in:
Roger Dingledine
2006-04-04 03:46:40 +00:00
parent 0825f61102
commit c4fb9d22cf
+2 -1
View File
@@ -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)