[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] if there"s more than one match for router-get-my-nickname,
Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or
Modified Files:
routerlist.c
Log Message:
if there's more than one match for router-get-my-nickname,
try to pick one that's running.
Index: routerlist.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.484
retrieving revision 1.485
diff -u -p -d -r1.484 -r1.485
--- routerlist.c 4 Apr 2006 03:25:36 -0000 1.484
+++ routerlist.c 4 Apr 2006 03:46:40 -0000 1.485
@@ -944,7 +944,8 @@ router_get_by_nickname(const char *nickn
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)