]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Turn authdir_mode_v3() into a non-inline function
authorNick Mathewson <nickm@torproject.org>
Mon, 16 Dec 2019 18:20:31 +0000 (13:20 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 9 Jan 2020 12:30:35 +0000 (07:30 -0500)
This change means that authmode.h no longer needs to see
or_options_t, and frees us from an ordering dependency.

src/feature/dirauth/authmode.c
src/feature/dirauth/authmode.h

index 29fcc6d1a985f1b3f3836b2bdc9d34638b3b3315..2292d1a417ca86e6b45d142b4fc4799d8598b02f 100644 (file)
@@ -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.
index 11bc40d8d1930c7e4e881a323888ebaa75a406c5..c1134a4c2ec290114522b939d361b8f1bd8530c1 100644 (file)
 #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)