From: Nick Mathewson Date: Thu, 1 Feb 2018 13:13:35 +0000 (-0500) Subject: Merge branch 'maint-0.3.2' X-Git-Tag: tor-0.3.3.2-alpha~43 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ca85d6621758269f7a94fbec22efa7f9d205c628;p=thirdparty%2Ftor.git Merge branch 'maint-0.3.2' --- ca85d6621758269f7a94fbec22efa7f9d205c628 diff --cc src/or/networkstatus.c index 7ab80dde8f,9d9a2b8ad1..31ecb20985 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@@ -1600,20 -1564,22 +1600,23 @@@ notify_control_networkstatus_changed(co smartlist_free(changed); } - /* Called when the consensus has changed from old_c to new_c. - * - * IMPORTANT: This is called _after_ the new consensus has been set in the - * global state so this is safe for anything getting the latest consensus from - * that state. */ + /* Called before the consensus changes from old_c to new_c. */ static void - notify_networkstatus_changed(const networkstatus_t *old_c, - const networkstatus_t *new_c) + notify_before_networkstatus_changes(const networkstatus_t *old_c, + const networkstatus_t *new_c) { notify_control_networkstatus_changed(old_c, new_c); - scheduler_notify_networkstatus_changed(old_c, new_c); + dos_consensus_has_changed(new_c); } + /* Called after a new consensus has been put in the global state. It is safe + * to use the consensus getters in this function. */ + static void + notify_after_networkstatus_changes(void) + { + scheduler_notify_networkstatus_changed(); + } + /** Copy all the ancillary information (like router download status and so on) * from old_c to new_c. */ static void