mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Make voting_schedule.h work correctly when dirauth-mode is disabled.
This commit is contained in:
parent
9fb18756df
commit
1b66b39699
@ -11,6 +11,8 @@
|
||||
|
||||
#include "core/or/or.h"
|
||||
|
||||
#ifdef HAVE_MODULE_DIRAUTH
|
||||
|
||||
/** Scheduling information for a voting interval. */
|
||||
typedef struct {
|
||||
/** When do we generate and distribute our vote for this interval? */
|
||||
@ -63,4 +65,29 @@ time_t dirauth_sched_get_next_valid_after_time(void);
|
||||
time_t dirauth_sched_get_cur_valid_after_time(void);
|
||||
int dirauth_sched_get_configured_interval(void);
|
||||
|
||||
#else /* !defined(HAVE_MODULE_DIRAUTH) */
|
||||
|
||||
#define dirauth_sched_recalculate_timing(opt,now) \
|
||||
((void)(opt), (void)(now))
|
||||
|
||||
static inline time_t
|
||||
dirauth_sched_get_next_valid_after_time(void)
|
||||
{
|
||||
tor_assert_unreached();
|
||||
return 0;
|
||||
}
|
||||
static inline time_t
|
||||
dirauth_sched_get_cur_valid_after_time(void)
|
||||
{
|
||||
tor_assert_unreached();
|
||||
return 0;
|
||||
}
|
||||
static inline int
|
||||
dirauth_sched_get_configured_interval(void)
|
||||
{
|
||||
tor_assert_unreached();
|
||||
return 1;
|
||||
}
|
||||
#endif /* defined(HAVE_MODULE_DIRAUTH) */
|
||||
|
||||
#endif /* !defined(TOR_VOTING_SCHEDULE_H) */
|
||||
|
Loading…
Reference in New Issue
Block a user