[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r16065: Fix bug in last patch: ADDR_POLICY_REJECT is not the same as (in tor/trunk: . src/or)
Author: nickm
Date: 2008-07-18 15:11:30 -0400 (Fri, 18 Jul 2008)
New Revision: 16065
Modified:
tor/trunk/
tor/trunk/src/or/routerlist.c
Log:
r17220@tombo: nickm | 2008-07-18 15:11:27 -0400
Fix bug in last patch: ADDR_POLICY_REJECT is not the same as ADDR_POLICY_REJECTED.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r17220] on 49666b30-7950-49c5-bedf-9dc8f3168102
Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c 2008-07-18 19:04:02 UTC (rev 16064)
+++ tor/trunk/src/or/routerlist.c 2008-07-18 19:11:30 UTC (rev 16065)
@@ -4715,13 +4715,16 @@
char d[DIGEST_LEN];
if (*nick == '$')
++nick;
+ log_debug(LD_CONFIG, "Adding identity %s to %s", nick, description);
base16_decode(d, sizeof(d), nick, HEX_DIGEST_LEN);
digestmap_set(target->digests, d, (void*)1);
} else if (is_legal_nickname(nick)) {
+ log_debug(LD_CONFIG, "Adding nickname %s to %s", nick, description);
strmap_set_lc(target->names, nick, (void*)1);
} else if ((strchr(nick,'.') || strchr(nick, '*')) &&
(p = router_parse_addr_policy_item_from_string(
- nick, ADDR_POLICY_REJECT))) {
+ nick, ADDR_POLICY_REJECT))) {
+ log_debug(LD_CONFIG, "Adding address %s to %s", nick, description);
smartlist_add(target->policies, p);
} else {
log_warn(LD_CONFIG, "Nickname '%s' in %s is misformed.", nick,
@@ -4762,7 +4765,7 @@
if (digestmap_get(set->digests, id_digest))
return 1;
if (compare_addr_to_addr_policy(addr, orport, set->policies)
- == ADDR_POLICY_REJECT)
+ == ADDR_POLICY_REJECTED)
return 1;
return 0;
}
@@ -4829,6 +4832,7 @@
return;
SMARTLIST_FOREACH(lst, routerinfo_t *, r, {
if (routerset_contains_router(routerset, r)) {
+ //log_debug(LD_DIR, "Subtracting %s",r->nickname);
SMARTLIST_DEL_CURRENT(lst, r);
}
});