commit 9d4c53534de1c496069860f313633e1c31a8a461 Author: Nick Mathewson nickm@torproject.org Date: Fri Sep 21 22:05:09 2012 -0400
Remove the testing_since* fields
They weren't actually used since 7a35dad00
Bug 5809 --- changes/bug5809 | 3 +++ src/or/dirserv.c | 6 +----- src/or/nodelist.c | 1 - src/or/or.h | 3 --- 4 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/changes/bug5809 b/changes/bug5809 new file mode 100644 index 0000000..ac3f6b1 --- /dev/null +++ b/changes/bug5809 @@ -0,0 +1,3 @@ + o Removed code: + - Removed the testing_since field of node_t, which hasn't been used + for anything since 0.2.0.9-alpha. diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 468515e..0d98324 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -3400,6 +3400,7 @@ dirserv_single_reachability_test(time_t now, routerinfo_t *router) { node_t *node = NULL; tor_addr_t router_addr; + (void) now;
tor_assert(router); node = node_get_mutable_by_id(router->cache_info.identity_digest); @@ -3408,9 +3409,6 @@ dirserv_single_reachability_test(time_t now, routerinfo_t *router) /* IPv4. */ log_debug(LD_OR,"Testing reachability of %s at %s:%u.", router->nickname, router->address, router->or_port); - /* Remember when we started trying to determine reachability */ - if (!node->testing_since) - node->testing_since = now; tor_addr_from_ipv4h(&router_addr, router->addr); connection_or_connect(&router_addr, router->or_port, router->cache_info.identity_digest); @@ -3423,8 +3421,6 @@ dirserv_single_reachability_test(time_t now, routerinfo_t *router) router->nickname, tor_addr_to_str(addrstr, &router->ipv6_addr, sizeof(addrstr), 1), router->ipv6_orport); - if (!node->testing_since6) - node->testing_since6 = now; connection_or_connect(&router->ipv6_addr, router->ipv6_orport, router->cache_info.identity_digest); } diff --git a/src/or/nodelist.c b/src/or/nodelist.c index c357bc0..642816c 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -127,7 +127,6 @@ static void node_addrs_changed(node_t *node) { node->last_reachable = node->last_reachable6 = 0; - node->testing_since = node->testing_since6 = 0; node->country = -1; }
diff --git a/src/or/or.h b/src/or/or.h index f7914b8..2e2c9f8 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2036,9 +2036,6 @@ typedef struct node_t { time_t last_reachable; /* IPv4. */ time_t last_reachable6; /* IPv6. */
- /** When did we start testing reachability for this OR? */ - time_t testing_since; /* IPv4. */ - time_t testing_since6; /* IPv6. */ } node_t;
/** How many times will we try to download a router's descriptor before giving
tor-commits@lists.torproject.org