aboutsummaryrefslogtreecommitdiff
path: root/src/or/bridges.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-11-15 08:15:29 -0500
committerNick Mathewson <nickm@torproject.org>2016-11-30 14:42:52 -0500
commitc74542c51a2ce75e602e3e237bd41d1fd08a2fb0 (patch)
tree13ff541248598bb7b34a1f410b81b617f0c32354 /src/or/bridges.c
parent8da24c99bdb90b04a05d5bccf5bcff1218174b75 (diff)
downloadtor-c74542c51a2ce75e602e3e237bd41d1fd08a2fb0.tar.gz
tor-c74542c51a2ce75e602e3e237bd41d1fd08a2fb0.zip
Add accessors as needed to repair compilation
The previous commit, in moving a bunch of functions to bridges.c, broke compilation because bridges.c required two entry points to entrynodes.c it didn't have.
Diffstat (limited to 'src/or/bridges.c')
-rw-r--r--src/or/bridges.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/or/bridges.c b/src/or/bridges.c
index 73510cf10c..508c77fc9e 100644
--- a/src/or/bridges.c
+++ b/src/or/bridges.c
@@ -52,7 +52,6 @@ typedef struct {
} bridge_info_t;
static void bridge_free(bridge_info_t *bridge);
-static int num_bridges_usable(void);
/** A list of configured bridges. Whenever we actually get a descriptor
* for one, we add it as an entry guard. Note that the order of bridges
@@ -719,7 +718,7 @@ learned_bridge_descriptor(routerinfo_t *ri, int from_cache)
fmt_and_decorate_addr(&bridge->addr),
(int) bridge->port);
}
- add_an_entry_guard(get_guard_selection_info(), node, 1, 1, 0, 0);
+ add_bridge_as_entry_guard(get_guard_selection_info(), node);
log_notice(LD_DIR, "new bridge descriptor '%s' (%s): %s", ri->nickname,
from_cache ? "cached" : "fresh", router_describe(ri));
@@ -747,19 +746,6 @@ any_bridge_descriptors_known(void)
return choose_random_entry(NULL) != NULL;
}
-/** Return the number of bridges that have descriptors that are marked with
- * purpose 'bridge' and are running.
- */
-static int
-num_bridges_usable(void)
-{
- int n_options = 0;
- tor_assert(get_options()->UseBridges);
- (void) choose_random_entry_impl(get_guard_selection_info(),
- NULL, 0, 0, &n_options);
- return n_options;
-}
-
/** Return a smartlist containing all bridge identity digests */
MOCK_IMPL(smartlist_t *,
list_bridge_identities, (void))