From 1f739e9b06974566685c662c3526384efd68ed32 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Wed, 2 May 2018 13:42:24 -0400 Subject: dirauth: Move authdir_mode_v3() to module This function must return false if the module is not compiled in. In order to do that, we move the authdir_mode_v3() function out of router.c and into the dirauth module new header file named mode.h. It is always returning false if we don't have the module. Closes #25990 Signed-off-by: David Goulet --- src/or/router.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/or/router.c') diff --git a/src/or/router.c b/src/or/router.c index 93b61b69ef..cc1979bcc9 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -35,6 +35,8 @@ #include "transports.h" #include "routerset.h" +#include "dirauth/mode.h" + /** * \file router.c * \brief Miscellaneous relay functionality, including RSA key maintenance, @@ -1612,14 +1614,6 @@ 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 * purpose on its dirport. -- cgit v1.2.3-54-g00ecf