mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 07:07:52 +01:00
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.
This commit is contained in:
parent
2f7a2c42d2
commit
09f03e6e3f
2 changed files with 10 additions and 8 deletions
|
@ -26,6 +26,15 @@ authdir_mode(const or_options_t *options)
|
||||||
{
|
{
|
||||||
return options->AuthoritativeDir != 0;
|
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
|
/** Return true iff we are an authoritative directory server that is
|
||||||
* authoritative about receiving and serving descriptors of type
|
* authoritative about receiving and serving descriptors of type
|
||||||
* <b>purpose</b> on its dirport.
|
* <b>purpose</b> on its dirport.
|
||||||
|
|
|
@ -14,19 +14,12 @@
|
||||||
#ifdef HAVE_MODULE_DIRAUTH
|
#ifdef HAVE_MODULE_DIRAUTH
|
||||||
|
|
||||||
int authdir_mode(const or_options_t *options);
|
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_handles_descs(const or_options_t *options, int purpose);
|
||||||
int authdir_mode_publishes_statuses(const or_options_t *options);
|
int authdir_mode_publishes_statuses(const or_options_t *options);
|
||||||
int authdir_mode_tests_reachability(const or_options_t *options);
|
int authdir_mode_tests_reachability(const or_options_t *options);
|
||||||
int authdir_mode_bridge(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? */
|
/* Is the dirauth module enabled? */
|
||||||
#define have_module_dirauth() (1)
|
#define have_module_dirauth() (1)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue