[tor-commits] [tor/master] Merge branch 'maint-0.3.2'

nickm at torproject.org nickm at torproject.org
Thu Feb 1 13:15:24 UTC 2018


commit ca85d6621758269f7a94fbec22efa7f9d205c628
Merge: d1c259709 61cb2993d
Author: Nick Mathewson <nickm at torproject.org>
Date:   Thu Feb 1 08:13:35 2018 -0500

    Merge branch 'maint-0.3.2'

 changes/bug24975          |  2 +-
 src/or/networkstatus.c    | 36 +++++++++++++++++++++---------------
 src/or/scheduler.c        |  5 ++---
 src/or/scheduler.h        |  8 +++-----
 src/or/scheduler_kist.c   | 20 ++++++++------------
 src/test/test_scheduler.c | 16 ++++++++--------
 6 files changed, 43 insertions(+), 44 deletions(-)

diff --cc src/or/networkstatus.c
index 7ab80dde8,9d9a2b8ad..31ecb2098
--- 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 <b>old_c</b> to <b>new_c</b>. */
  static void



More information about the tor-commits mailing list