From 7bc636fdc937c5cd050cb243e5bebb8a52c1c144 Mon Sep 17 00:00:00 2001 From: Taylor Yu Date: Fri, 21 Apr 2017 20:17:27 -0400 Subject: Add regression test for #22304 --- src/or/control.c | 2 +- src/or/control.h | 4 ++++ src/or/routerlist.c | 4 ++-- src/or/routerlist.h | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src/or') diff --git a/src/or/control.c b/src/or/control.c index 8e86005b83..56f1329029 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -1873,7 +1873,7 @@ getinfo_helper_listeners(control_connection_t *control_conn, /** Implementation helper for GETINFO: knows the answers for questions about * directory information. */ -static int +STATIC int getinfo_helper_dir(control_connection_t *control_conn, const char *question, char **answer, const char **errmsg) diff --git a/src/or/control.h b/src/or/control.h index a786dfe1af..41a194bfcb 100644 --- a/src/or/control.h +++ b/src/or/control.h @@ -290,6 +290,10 @@ STATIC int getinfo_helper_downloads( control_connection_t *control_conn, const char *question, char **answer, const char **errmsg); +STATIC int getinfo_helper_dir( + control_connection_t *control_conn, + const char *question, char **answer, + const char **errmsg); #endif diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 0b0bb4b1d2..35fe501228 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -3045,8 +3045,8 @@ router_get_by_extrainfo_digest,(const char *digest)) /** Return the signed descriptor for the extrainfo_t in our routerlist whose * extra-info-digest is digest. Return NULL if no such extra-info * document is known. */ -signed_descriptor_t * -extrainfo_get_by_descriptor_digest(const char *digest) +MOCK_IMPL(signed_descriptor_t *, +extrainfo_get_by_descriptor_digest,(const char *digest)) { extrainfo_t *ei; tor_assert(digest); diff --git a/src/or/routerlist.h b/src/or/routerlist.h index 5376369e8d..5c1f76c8e7 100644 --- a/src/or/routerlist.h +++ b/src/or/routerlist.h @@ -92,7 +92,8 @@ routerinfo_t *router_get_mutable_by_digest(const char *digest); signed_descriptor_t *router_get_by_descriptor_digest(const char *digest); MOCK_DECL(signed_descriptor_t *,router_get_by_extrainfo_digest, (const char *digest)); -signed_descriptor_t *extrainfo_get_by_descriptor_digest(const char *digest); +MOCK_DECL(signed_descriptor_t *,extrainfo_get_by_descriptor_digest, + (const char *digest)); const char *signed_descriptor_get_body(const signed_descriptor_t *desc); const char *signed_descriptor_get_annotations(const signed_descriptor_t *desc); routerlist_t *router_get_routerlist(void); -- cgit v1.2.3-54-g00ecf