[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r10238: Make the NodeFamilies config option work. (Reported by lodge (in tor/trunk: . src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r10238: Make the NodeFamilies config option work. (Reported by lodge (in tor/trunk: . src/or)
- From: arma@xxxxxxxx
- Date: Mon, 21 May 2007 20:47:00 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Mon, 21 May 2007 20:47:16 -0400
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: arma
Date: 2007-05-21 20:46:55 -0400 (Mon, 21 May 2007)
New Revision: 10238
Modified:
tor/trunk/ChangeLog
tor/trunk/src/or/routerlist.c
Log:
Make the NodeFamilies config option work. (Reported by
lodger -- it has never actually worked, even though we added it
in Oct 2004.)
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2007-05-21 21:48:02 UTC (rev 10237)
+++ tor/trunk/ChangeLog 2007-05-22 00:46:55 UTC (rev 10238)
@@ -116,6 +116,9 @@
o Minor features (other):
- More unit tests.
+ - Make the NodeFamilies config option work. (Reported by
+ lodger -- it has never actually worked, even though we added it
+ in Oct 2004.)
o Removed features:
- Removed support for the old binary "version 0" controller protocol.
Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c 2007-05-21 21:48:02 UTC (rev 10237)
+++ tor/trunk/src/or/routerlist.c 2007-05-22 00:46:55 UTC (rev 10238)
@@ -823,23 +823,23 @@
if (options->EnforceDistinctSubnets)
routerlist_add_network_family(sl, router);
- if (!router->declared_family)
- return;
- /* Add every r such that router declares familyness with r, and r
- * declares familyhood with router. */
- SMARTLIST_FOREACH(router->declared_family, const char *, n,
- {
- if (!(r = router_get_by_nickname(n, 0)))
- continue;
- if (!r->declared_family)
- continue;
- SMARTLIST_FOREACH(r->declared_family, const char *, n2,
- {
- if (router_nickname_matches(router, n2))
- smartlist_add(sl, r);
- });
- });
+ if (router->declared_family) {
+ /* Add every r such that router declares familyness with r, and r
+ * declares familyhood with router. */
+ SMARTLIST_FOREACH(router->declared_family, const char *, n,
+ {
+ if (!(r = router_get_by_nickname(n, 0)))
+ continue;
+ if (!r->declared_family)
+ continue;
+ SMARTLIST_FOREACH(r->declared_family, const char *, n2,
+ {
+ if (router_nickname_matches(router, n2))
+ smartlist_add(sl, r);
+ });
+ });
+ }
/* If the user declared any families locally, honor those too. */
for (cl = get_options()->NodeFamilies; cl; cl = cl->next) {