aboutsummaryrefslogtreecommitdiff
path: root/src/or/entrynodes.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2014-06-15 18:38:52 -0700
committerGeorge Kadianakis <desnacked@riseup.net>2014-06-15 19:02:59 -0700
commitbf263a9b99c41becc62ebe967124931330ae4016 (patch)
treed13b91d5b6b229cde0522d93d4ac11f8c85e610c /src/or/entrynodes.c
parent71da44f159ae0a3b0d267673ab5a74b51a843dca (diff)
downloadtor-bf263a9b99c41becc62ebe967124931330ae4016.tar.gz
tor-bf263a9b99c41becc62ebe967124931330ae4016.zip
Make a few entrynodes.c functions testable.
Diffstat (limited to 'src/or/entrynodes.c')
-rw-r--r--src/or/entrynodes.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c
index d732791b48..360c7386c5 100644
--- a/src/or/entrynodes.c
+++ b/src/or/entrynodes.c
@@ -12,6 +12,8 @@
* circumvention).
**/
+#define ENTRYNODES_PRIVATE
+
#include "or.h"
#include "circpathbias.h"
#include "circuitbuild.h"
@@ -350,7 +352,7 @@ control_event_guard_deferred(void)
* If <b>chosen</b> is defined, use that one, and if it's not
* already in our entry_guards list, put it at the *beginning*.
* Else, put the one we pick at the end of the list. */
-static const node_t *
+STATIC const node_t *
add_an_entry_guard(const node_t *chosen, int reset_status, int prepend,
int for_discovery, int for_directory)
{
@@ -437,7 +439,7 @@ add_an_entry_guard(const node_t *chosen, int reset_status, int prepend,
/** Choose how many entry guards or directory guards we'll use. If
* <b>for_directory</b> is true, we return how many directory guards to
* use; else we return how many entry guards to use. */
-static int
+STATIC int
decide_num_guards(const or_options_t *options, int for_directory)
{
if (for_directory && options->NumDirectoryGuards != 0)
@@ -836,7 +838,7 @@ update_node_guard_status(void)
/** Adjust the entry guards list so that it only contains entries from
* EntryNodes, adding new entries from EntryNodes to the list as needed. */
-static void
+STATIC void
entry_guards_set_from_config(const or_options_t *options)
{
smartlist_t *entry_nodes, *worse_entry_nodes, *entry_fps;
@@ -997,7 +999,7 @@ choose_random_dirguard(dirinfo_type_t type)
/* DOCDOCODC
Return 1 if we should choose a guard right away. */
-static int
+STATIC int
populate_live_entry_guards(smartlist_t *live_entry_guards,
const smartlist_t *all_entry_guards,
const node_t *chosen_exit,