diff options
author | teor <teor@torproject.org> | 2019-11-14 16:17:17 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-11-14 16:17:17 +1000 |
commit | 88c2a23c4b3954b321d2247ca3d66cff68e1912d (patch) | |
tree | 4687f3bc22bc4fcacaf213b5498320a7d462ce77 /src/feature/relay/relay_periodic.h | |
parent | 3b4a360ed0decaf7285c825cfab7712d6d5ebb37 (diff) | |
download | tor-88c2a23c4b3954b321d2247ca3d66cff68e1912d.tar.gz tor-88c2a23c4b3954b321d2247ca3d66cff68e1912d.zip |
relay: Disable relay_periodic when the relay module is disabled
Closes ticket 32244.
Diffstat (limited to 'src/feature/relay/relay_periodic.h')
-rw-r--r-- | src/feature/relay/relay_periodic.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/feature/relay/relay_periodic.h b/src/feature/relay/relay_periodic.h index b6ea83c749..8da5b536a7 100644 --- a/src/feature/relay/relay_periodic.h +++ b/src/feature/relay/relay_periodic.h @@ -12,7 +12,20 @@ #ifndef TOR_FEATURE_RELAY_RELAY_PERIODIC_H #define TOR_FEATURE_RELAY_RELAY_PERIODIC_H +#ifdef HAVE_MODULE_RELAY + void relay_register_periodic_events(void); void reschedule_descriptor_update_check(void); +#else + +#include "lib/cc/compat_compiler.h" + +#define relay_register_periodic_events() \ + STMT_NIL +#define reschedule_descriptor_update_check() \ + STMT_NIL + +#endif + #endif /* !defined(TOR_FEATURE_RELAY_RELAY_PERIODIC_H) */ |