summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2020-03-17 16:10:49 +1000
committerteor <teor@torproject.org>2020-03-20 18:05:10 +1000
commit07280c567e4afa9a74f203fbd22cc2cfcc34f875 (patch)
tree616e90fccf5a6f0a70f7f4d35cabb1768e187248
parent4bb06cae26f060499168c7f94bc546ed2138945c (diff)
downloadtor-07280c567e4afa9a74f203fbd22cc2cfcc34f875.tar.gz
tor-07280c567e4afa9a74f203fbd22cc2cfcc34f875.zip
relay: Re-order selftest header
The selftest header declares functions, and stubs for when the relay module is disabled. Put the functions and stubs in the same order. Part of 33633.
-rw-r--r--src/feature/relay/selftest.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/feature/relay/selftest.h b/src/feature/relay/selftest.h
index f3dd698bb7..ffe06eda67 100644
--- a/src/feature/relay/selftest.h
+++ b/src/feature/relay/selftest.h
@@ -13,14 +13,17 @@
#define TOR_SELFTEST_H
#ifdef HAVE_MODULE_RELAY
+
struct or_options_t;
int check_whether_orport_reachable(const struct or_options_t *options);
int check_whether_dirport_reachable(const struct or_options_t *options);
void router_do_reachability_checks(int test_or, int test_dir);
+void router_perform_bandwidth_test(int num_circs, time_t now);
+
void router_orport_found_reachable(void);
void router_dirport_found_reachable(void);
-void router_perform_bandwidth_test(int num_circs, time_t now);
+
void router_reset_reachability(void);
#else /* !defined(HAVE_MODULE_RELAY) */
@@ -30,13 +33,6 @@ void router_reset_reachability(void);
#define check_whether_dirport_reachable(opts) \
((void)(opts), 0)
-#define router_orport_found_reachable() \
- STMT_NIL
-#define router_dirport_found_reachable() \
- STMT_NIL
-#define router_reset_reachability() \
- STMT_NIL
-
static inline void
router_do_reachability_checks(int test_or, int test_dir)
{
@@ -52,6 +48,14 @@ router_perform_bandwidth_test(int num_circs, time_t now)
tor_assert_nonfatal_unreached();
}
+#define router_orport_found_reachable() \
+ STMT_NIL
+#define router_dirport_found_reachable() \
+ STMT_NIL
+
+#define router_reset_reachability() \
+ STMT_NIL
+
#endif /* defined(HAVE_MODULE_RELAY) */
#endif /* !defined(TOR_SELFTEST_H) */