]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
sched: Allow the new sched to react to new cons
authorMatt Traudt <sirmatt@ksu.edu>
Tue, 19 Sep 2017 23:06:13 +0000 (19:06 -0400)
committerMatt Traudt <sirmatt@ksu.edu>
Tue, 19 Sep 2017 23:07:48 +0000 (19:07 -0400)
changes/bug23537 [new file with mode: 0644]
src/or/scheduler.c

diff --git a/changes/bug23537 b/changes/bug23537
new file mode 100644 (file)
index 0000000..93072a3
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes (scheduler):
+    - When switching schedulers due to a consensus change, we didn't give the new
+      scheduler a chance to react to the consensus. Fix that. Fixes bug 23537;
+      bugfix on 0.3.2.1-alpha
index ca3cafd9af7cf17a823421ff143e2568d384e539..64628e4c73b9573db010376b19ef9e13df94c840 100644 (file)
@@ -371,12 +371,13 @@ void
 scheduler_notify_networkstatus_changed(const networkstatus_t *old_c,
                                        const networkstatus_t *new_c)
 {
+  /* Maybe the consensus param made us change the scheduler. */
+  set_scheduler();
+
   /* Then tell the (possibly new) scheduler that we have a new consensus */
   if (the_scheduler->on_new_consensus) {
     the_scheduler->on_new_consensus(old_c, new_c);
   }
-  /* Maybe the consensus param made us change the scheduler. */
-  set_scheduler();
 }
 
 /*