]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge branch 'maint-0.3.2'
authorNick Mathewson <nickm@torproject.org>
Thu, 1 Feb 2018 13:13:35 +0000 (08:13 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 1 Feb 2018 13:15:09 +0000 (08:15 -0500)
1  2 
src/or/networkstatus.c
src/or/scheduler.c
src/or/scheduler.h
src/or/scheduler_kist.c
src/test/test_scheduler.c

index 7ab80dde8f356eb80fb44a69e4b8377f5a0463e3,9d9a2b8ad1ccfd96481ab059435035a6362046be..31ecb2098503b03f979693141f0588d177d65bdd
@@@ -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
Simple merge
Simple merge
Simple merge
Simple merge