[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/maint-0.2.8] get rid of another no-longer-used function
commit 53aaed81dd34f227366b0a0c9b143c4c43a5529e
Author: Roger Dingledine <arma@xxxxxxxxxxxxxx>
Date: Tue May 10 11:16:30 2016 -0400
get rid of another no-longer-used function
---
src/or/networkstatus.c | 34 ----------------------------------
src/or/networkstatus.h | 1 -
2 files changed, 35 deletions(-)
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index 074922b..a9c8037 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -1288,40 +1288,6 @@ networkstatus_consensus_can_use_extra_fallbacks(const or_options_t *options)
> smartlist_len(router_get_trusted_dir_servers())));
}
-/* Check if there is more than 1 consensus connection retrieving the usable
- * consensus flavor. If so, return 1, if not, return 0.
- *
- * During normal operation, Tor only makes one consensus download
- * connection. But clients can make multiple simultaneous consensus
- * connections to improve bootstrap speed and reliability.
- *
- * If there is more than one connection, we must have connections left
- * over from bootstrapping. However, some of the connections may have
- * completed and been cleaned up, so it is not sufficient to check the
- * return value of this function to see if a client could make multiple
- * bootstrap connections. Use
- * networkstatus_consensus_can_use_multiple_directories()
- * and networkstatus_consensus_is_bootstrapping(). */
-int
-networkstatus_consensus_has_excess_connections(void)
-{
- const char *usable_resource = networkstatus_get_flavor_name(
- usable_consensus_flavor());
- const int consens_conn_usable_count =
- connection_dir_count_by_purpose_and_resource(
- DIR_PURPOSE_FETCH_CONSENSUS,
- usable_resource);
- /* The maximum number of connections we want downloading a usable consensus
- * Always 1, whether bootstrapping or not. */
- const int max_expected_consens_conn_usable_count = 1;
-
- if (consens_conn_usable_count > max_expected_consens_conn_usable_count) {
- return 1;
- }
-
- return 0;
-}
-
/* Is there a consensus fetch for flavor <b>resource</b> that's far
* enough along to be attached to a circuit? */
int
diff --git a/src/or/networkstatus.h b/src/or/networkstatus.h
index 667bc1f..609fb85 100644
--- a/src/or/networkstatus.h
+++ b/src/or/networkstatus.h
@@ -75,7 +75,6 @@ int networkstatus_consensus_can_use_multiple_directories(
const or_options_t *options);
int networkstatus_consensus_can_use_extra_fallbacks(
const or_options_t *options);
-int networkstatus_consensus_has_excess_connections(void);
int networkstatus_consensus_is_already_downloading(const char *resource);
#define NSSET_FROM_CACHE 1
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits