diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-12-16 13:20:31 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-01-09 07:30:35 -0500 |
commit | 09f03e6e3f6651281cf2bf7eb2968d9659a6658d (patch) | |
tree | bb0a01b278a0815be3cf7ea73d81fef231712f1c /src/feature/dirauth | |
parent | 2f7a2c42d2dcc36f8d6b58aff67f6a7d388f81ed (diff) | |
download | tor-09f03e6e3f6651281cf2bf7eb2968d9659a6658d.tar.gz tor-09f03e6e3f6651281cf2bf7eb2968d9659a6658d.zip |
Turn authdir_mode_v3() into a non-inline function
This change means that authmode.h no longer needs to see
or_options_t, and frees us from an ordering dependency.
Diffstat (limited to 'src/feature/dirauth')
-rw-r--r-- | src/feature/dirauth/authmode.c | 9 | ||||
-rw-r--r-- | src/feature/dirauth/authmode.h | 9 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/feature/dirauth/authmode.c b/src/feature/dirauth/authmode.c index 29fcc6d1a9..2292d1a417 100644 --- a/src/feature/dirauth/authmode.c +++ b/src/feature/dirauth/authmode.c @@ -26,6 +26,15 @@ authdir_mode(const or_options_t *options) { return options->AuthoritativeDir != 0; } + +/* Return true iff we believe ourselves to be a v3 authoritative directory + * server. */ +int +authdir_mode_v3(const or_options_t *options) +{ + return authdir_mode(options) && options->V3AuthoritativeDir != 0; +} + /** Return true iff we are an authoritative directory server that is * authoritative about receiving and serving descriptors of type * <b>purpose</b> on its dirport. diff --git a/src/feature/dirauth/authmode.h b/src/feature/dirauth/authmode.h index 11bc40d8d1..c1134a4c2e 100644 --- a/src/feature/dirauth/authmode.h +++ b/src/feature/dirauth/authmode.h @@ -14,19 +14,12 @@ #ifdef HAVE_MODULE_DIRAUTH int authdir_mode(const or_options_t *options); +int authdir_mode_v3(const or_options_t *options); int authdir_mode_handles_descs(const or_options_t *options, int purpose); int authdir_mode_publishes_statuses(const or_options_t *options); int authdir_mode_tests_reachability(const or_options_t *options); int authdir_mode_bridge(const or_options_t *options); -/* Return true iff we believe ourselves to be a v3 authoritative directory - * server. */ -static inline int -authdir_mode_v3(const or_options_t *options) -{ - return authdir_mode(options) && options->V3AuthoritativeDir != 0; -} - /* Is the dirauth module enabled? */ #define have_module_dirauth() (1) |