aboutsummaryrefslogtreecommitdiff
path: root/src/feature/dircache
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-10-21 15:24:22 +1000
committerteor <teor@torproject.org>2019-10-21 15:24:22 +1000
commit7a72e71f74546715f30004474f5a4a482be46d7c (patch)
tree37b7d202797e88fcbebb12c02fe5a0c90d73f0e8 /src/feature/dircache
parent77c85360f66222365f2fbb98982b8bc0e4781acb (diff)
parent4fde7699ee5975db55c418bc7011eaabc64d94c9 (diff)
downloadtor-7a72e71f74546715f30004474f5a4a482be46d7c.tar.gz
tor-7a72e71f74546715f30004474f5a4a482be46d7c.zip
Merge remote-tracking branch 'tor-github/pr/1434'
Diffstat (limited to 'src/feature/dircache')
-rw-r--r--src/feature/dircache/dirserv.c4
-rw-r--r--src/feature/dircache/dirserv.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/feature/dircache/dirserv.c b/src/feature/dircache/dirserv.c
index 79400bf15f..85331bfeaa 100644
--- a/src/feature/dircache/dirserv.c
+++ b/src/feature/dircache/dirserv.c
@@ -259,8 +259,8 @@ dirserv_set_cached_consensus_networkstatus(const char *networkstatus,
/** Return the latest downloaded consensus networkstatus in encoded, signed,
* optionally compressed format, suitable for sending to clients. */
-cached_dir_t *
-dirserv_get_consensus(const char *flavor_name)
+MOCK_IMPL(cached_dir_t *,
+dirserv_get_consensus,(const char *flavor_name))
{
if (!cached_consensuses)
return NULL;
diff --git a/src/feature/dircache/dirserv.h b/src/feature/dircache/dirserv.h
index 7f944459da..0c15c9ad19 100644
--- a/src/feature/dircache/dirserv.h
+++ b/src/feature/dircache/dirserv.h
@@ -82,7 +82,7 @@ int directory_permits_begindir_requests(const or_options_t *options);
int directory_too_idle_to_fetch_descriptors(const or_options_t *options,
time_t now);
-cached_dir_t *dirserv_get_consensus(const char *flavor_name);
+MOCK_DECL(cached_dir_t *, dirserv_get_consensus, (const char *flavor_name));
void dirserv_set_cached_consensus_networkstatus(const char *consensus,
size_t consensus_len,
const char *flavor_name,