mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Declare relay/dirauth subsystem levels in a header.
This way, we can't get out of sync between the two declarations.
This commit is contained in:
parent
8d474e4dc5
commit
13df744921
@ -27,7 +27,7 @@ static const config_format_t dirauth_options_stub_fmt = {
|
||||
const struct subsys_fns_t sys_dirauth = {
|
||||
.name = "dirauth",
|
||||
.supported = false,
|
||||
.level = 70,
|
||||
.level = DIRAUTH_SUBSYS_LEVEL,
|
||||
|
||||
.options_format = &dirauth_options_stub_fmt
|
||||
};
|
||||
|
@ -60,7 +60,7 @@ dirauth_set_options(void *arg)
|
||||
const struct subsys_fns_t sys_dirauth = {
|
||||
.name = "dirauth",
|
||||
.supported = true,
|
||||
.level = 70,
|
||||
.level = DIRAUTH_SUBSYS_LEVEL,
|
||||
.initialize = subsys_dirauth_initialize,
|
||||
.shutdown = subsys_dirauth_shutdown,
|
||||
|
||||
|
@ -17,4 +17,12 @@ const struct dirauth_options_t *dirauth_get_options(void);
|
||||
|
||||
extern const struct subsys_fns_t sys_dirauth;
|
||||
|
||||
/**
|
||||
* Subsystem level for the directory-authority system.
|
||||
*
|
||||
* Defined here so that it can be shared between the real and stub
|
||||
* definitions.
|
||||
**/
|
||||
#define DIRAUTH_SUBSYS_LEVEL 70
|
||||
|
||||
#endif /* !defined(DIRAUTH_SYS_H) */
|
||||
|
@ -16,5 +16,5 @@
|
||||
const struct subsys_fns_t sys_relay = {
|
||||
.name = "relay",
|
||||
.supported = false,
|
||||
.level = 50,
|
||||
.level = RELAY_SUBSYS_LEVEL,
|
||||
};
|
||||
|
@ -42,7 +42,7 @@ subsys_relay_shutdown(void)
|
||||
const struct subsys_fns_t sys_relay = {
|
||||
.name = "relay",
|
||||
.supported = true,
|
||||
.level = 50,
|
||||
.level = RELAY_SUBSYS_LEVEL,
|
||||
.initialize = subsys_relay_initialize,
|
||||
.shutdown = subsys_relay_shutdown,
|
||||
};
|
||||
|
@ -14,4 +14,12 @@
|
||||
|
||||
extern const struct subsys_fns_t sys_relay;
|
||||
|
||||
/**
|
||||
* Subsystem level for the relay system.
|
||||
*
|
||||
* Defined here so that it can be shared between the real and stub
|
||||
* definitions.
|
||||
**/
|
||||
#define RELAY_SUBSYS_LEVEL 50
|
||||
|
||||
#endif /* !defined(TOR_FEATURE_RELAY_RELAY_SYS_H) */
|
||||
|
Loading…
Reference in New Issue
Block a user