From 79d3e94f8b1769ee8d1957cb1d6dd35bd02a7271 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 30 Nov 2016 12:35:16 -0500 Subject: prop271: Tests for the highlevel or_state_t encode/decode functions --- src/or/entrynodes.c | 4 ++-- src/or/entrynodes.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/or') diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c index 9441be4c78..1f6d562fd8 100644 --- a/src/or/entrynodes.c +++ b/src/or/entrynodes.c @@ -1115,8 +1115,8 @@ remove_guard_from_confirmed_and_primary_lists(guard_selection_t *gs, /** Return true iff guard is currently "listed" -- that is, it * appears in the consensus, or as a configured bridge (as * appropriate) */ -static int -entry_guard_is_listed(guard_selection_t *gs, const entry_guard_t *guard) +MOCK_IMPL(STATIC int, +entry_guard_is_listed,(guard_selection_t *gs, const entry_guard_t *guard)) { if (gs->type == GS_TYPE_BRIDGE) { return NULL != get_bridge_info_for_guard(guard); diff --git a/src/or/entrynodes.h b/src/or/entrynodes.h index b676172567..c05a3e3a2c 100644 --- a/src/or/entrynodes.h +++ b/src/or/entrynodes.h @@ -498,6 +498,8 @@ STATIC guard_selection_t *guard_selection_new(const char *name, STATIC guard_selection_t *get_guard_selection_by_name( const char *name, guard_selection_type_t type, int create_if_absent); STATIC void guard_selection_free(guard_selection_t *gs); +MOCK_DECL(STATIC int, entry_guard_is_listed, + (guard_selection_t *gs, const entry_guard_t *guard)); STATIC const char *choose_guard_selection(const or_options_t *options, const networkstatus_t *ns, const char *old_selection, -- cgit v1.2.3-54-g00ecf