]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
get rid of another no-longer-used function
authorRoger Dingledine <arma@torproject.org>
Tue, 10 May 2016 15:16:30 +0000 (11:16 -0400)
committerRoger Dingledine <arma@torproject.org>
Tue, 10 May 2016 15:16:30 +0000 (11:16 -0400)
src/or/networkstatus.c
src/or/networkstatus.h

index 074922bcf091c39813fec97704216bf41d9a25bf..a9c8037e41f9743e8378fb408a7fba8a5b3edcf9 100644 (file)
@@ -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
index 667bc1f0626c6f023645ca29239fd070d5c1b276..609fb85bcbc3e7f9e46b53035f35f13a9fbb5b0d 100644 (file)
@@ -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