summaryrefslogtreecommitdiff
path: root/src/or/networkstatus.c
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2016-06-28 21:30:57 +0000
committerAndrea Shepard <andrea@torproject.org>2016-06-29 05:55:42 +0000
commit657eaee6ae640d5abffc760bed14b5d31ad1ea73 (patch)
treef38d042a7c80a8146da8acd1a8bc96174b6924ee /src/or/networkstatus.c
parentc69290072819d20e43bd0dd83fa8cefc1167b544 (diff)
downloadtor-657eaee6ae640d5abffc760bed14b5d31ad1ea73.tar.gz
tor-657eaee6ae640d5abffc760bed14b5d31ad1ea73.zip
Expose GETINFO download status statics for test suite and make things mockable
Diffstat (limited to 'src/or/networkstatus.c')
-rw-r--r--src/or/networkstatus.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index a582b852ae..99680472f5 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -683,8 +683,8 @@ router_get_descriptor_digests_in_consensus(networkstatus_t *consensus)
/** Return a smartlist of all router descriptor digests in the current
* consensus */
-smartlist_t *
-router_get_descriptor_digests(void)
+MOCK_IMPL(smartlist_t *,
+router_get_descriptor_digests,(void))
{
smartlist_t *result = NULL;
@@ -1219,8 +1219,8 @@ consensus_is_waiting_for_certs(void)
/** Look up the currently active (depending on bootstrap status) download
* status for this consensus flavor and return a pointer to it.
*/
-download_status_t *
-networkstatus_get_dl_status_by_flavor(consensus_flavor_t flavor)
+MOCK_IMPL(download_status_t *,
+networkstatus_get_dl_status_by_flavor,(consensus_flavor_t flavor))
{
download_status_t *dl = NULL;
const int we_are_bootstrapping =
@@ -1236,8 +1236,8 @@ networkstatus_get_dl_status_by_flavor(consensus_flavor_t flavor)
/** Look up the bootstrap download status for this consensus flavor
* and return a pointer to it. */
-download_status_t *
-networkstatus_get_dl_status_by_flavor_bootstrap(consensus_flavor_t flavor)
+MOCK_IMPL(download_status_t *,
+networkstatus_get_dl_status_by_flavor_bootstrap,(consensus_flavor_t flavor))
{
download_status_t *dl = NULL;
@@ -1250,8 +1250,8 @@ networkstatus_get_dl_status_by_flavor_bootstrap(consensus_flavor_t flavor)
/** Look up the running (non-bootstrap) download status for this consensus
* flavor and return a pointer to it. */
-download_status_t *
-networkstatus_get_dl_status_by_flavor_running(consensus_flavor_t flavor)
+MOCK_IMPL(download_status_t *,
+networkstatus_get_dl_status_by_flavor_running,(consensus_flavor_t flavor))
{
download_status_t *dl = NULL;