summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-10-22 16:32:04 +0000
committerNick Mathewson <nickm@torproject.org>2007-10-22 16:32:04 +0000
commitc47eb2c8d95b57081b3f00fe90a1db9f3a10d4b0 (patch)
tree5c8322f93965b9417b5768403c0705f2a7b52f8d /src/or/config.c
parentdb058694663f1a0283a29fd11468619b0bf1de74 (diff)
downloadtor-c47eb2c8d95b57081b3f00fe90a1db9f3a10d4b0.tar.gz
tor-c47eb2c8d95b57081b3f00fe90a1db9f3a10d4b0.zip
r16032@catbus: nickm | 2007-10-22 11:56:53 -0400
When our directory status or our v3 authority status changes, reschedule operations as appropriate. (Fixes some xxxx020 items) svn:r12102
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 338f53875e..eb2f50bd0d 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1119,6 +1119,17 @@ options_act(or_options_t *old_options)
options_transition_affects_descriptor(old_options, options))
mark_my_descriptor_dirty();
+ /* We may need to reschedule some directory stuff if our status changed. */
+ if (authdir_mode_v3(options) && !authdir_mode_v3(old_options))
+ dirvote_recalculate_timing(options, time(NULL));
+ if (!bool_eq(dirserver_mode(options), dirserver_mode(old_options))) {
+ /* Make sure update_router_have_min_dir_info gets called. */
+ router_dir_info_changed();
+ /* We might need to download a new consensus status later or sooner than
+ * we had expected. */
+ update_consensus_networkstatus_fetch_time(time(NULL));
+ }
+
return 0;
}