diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-04-30 12:42:33 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-05-02 09:22:13 -0400 |
commit | 6f42efaa5926a2f1be89e3b591311f2130931db8 (patch) | |
tree | e4cc3cd0485c24e4c4362c32e66f6b46ec2e92ee /src/core/mainloop | |
parent | 996f7c75ba6abd9c4bc884f2c9a3b62889da9134 (diff) | |
download | tor-6f42efaa5926a2f1be89e3b591311f2130931db8.tar.gz tor-6f42efaa5926a2f1be89e3b591311f2130931db8.zip |
Move voteflags.[ch] to become dirauth only.
For various reasons, this was a nontrivial movement. There are
several places in the code where we do something like "update the
flags on this routerstatus or node if we're an authority", and at
least one where we pretended to be an authority when we weren't.
Diffstat (limited to 'src/core/mainloop')
-rw-r--r-- | src/core/mainloop/mainloop.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/core/mainloop/mainloop.c b/src/core/mainloop/mainloop.c index 30dad956ae..eb875df023 100644 --- a/src/core/mainloop/mainloop.c +++ b/src/core/mainloop/mainloop.c @@ -75,6 +75,7 @@ #include "feature/control/control.h" #include "feature/control/control_events.h" #include "feature/dirauth/authmode.h" +#include "feature/dirauth/bridgeauth.h" #include "feature/dircache/consdiffmgr.h" #include "feature/dircache/dirserv.h" #include "feature/dircommon/directory.h" @@ -1366,7 +1367,6 @@ CALLBACK(retry_listeners); CALLBACK(rotate_onion_key); CALLBACK(rotate_x509_certificate); CALLBACK(save_state); -CALLBACK(write_bridge_ns); CALLBACK(write_stats_file); CALLBACK(control_per_second_events); CALLBACK(second_elapsed); @@ -1433,9 +1433,6 @@ STATIC periodic_event_item_t mainloop_periodic_events[] = { /* XXXX this could be restricted to CLIENT+NET_PARTICIPANT */ CALLBACK(rend_cache_failure_clean, NET_PARTICIPANT, FL(RUN_ON_DISABLE)), - /* Bridge Authority only. */ - CALLBACK(write_bridge_ns, BRIDGEAUTH, 0), - /* Directory server only. */ CALLBACK(clean_consdiffmgr, DIRSERVER, 0), @@ -2369,22 +2366,6 @@ check_dns_honesty_callback(time_t now, const or_options_t *options) return 12*3600 + crypto_rand_int(12*3600); } -/** - * Periodic callback: if we're the bridge authority, write a networkstatus - * file to disk. - */ -static int -write_bridge_ns_callback(time_t now, const or_options_t *options) -{ - /* 10. write bridge networkstatus file to disk */ - if (options->BridgeAuthoritativeDir) { - networkstatus_dump_bridge_status_to_file(now); -#define BRIDGE_STATUSFILE_INTERVAL (30*60) - return BRIDGE_STATUSFILE_INTERVAL; - } - return PERIODIC_EVENT_NO_UPDATE; -} - static int heartbeat_callback_first_time = 1; /** |