From: Nick Mathewson Date: Wed, 5 May 2004 04:55:00 +0000 (+0000) Subject: Never list unapproved servers as recommended X-Git-Tag: debian-version-0.0.6.1-1~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44defa4b1af2c6af68235e808907d5afa046b980;p=thirdparty%2Ftor.git Never list unapproved servers as recommended svn:r1790 --- diff --git a/src/or/dirserv.c b/src/or/dirserv.c index c7590036fc..128dd8276a 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -166,6 +166,20 @@ dirserv_router_fingerprint_is_known(const routerinfo_t *router) } } +/* Return true iff any router named 'nickname' is in the fingerprint + * list. */ +static int +router_nickname_is_approved(const char *nickname) +{ + int i; + for (i=0;inickname) /* it's an OP, don't list it */ continue; - /* XXX if conn->nickname not approved, continue. otherwise when you - * remove them from the approved list and hup, their descriptor is - * taken out of the directory, but they're still in the running-routers - * line. */ + if (!router_nickname_is_approved(conn->nickname)) + continue; /* If we removed them from the approved list, don't list it.*/ nickname_lst[n++] = conn->nickname; } length = n + 1; /* spaces + EOS + 1. */