[tor-bugs] #23537 [Core Tor/Tor]: Allow the new sched to respond to a new conensus, not the old one.
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Sep 18 14:35:02 UTC 2017
#23537: Allow the new sched to respond to a new conensus, not the old one.
-----------------------------+------------------------------------
Reporter: pastly | Owner: (none)
Type: defect | Status: merge_ready
Priority: Medium | Milestone: Tor: 0.3.2.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: tor-sched, easy | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
-----------------------------+------------------------------------
Changes (by pastly):
* status: new => merge_ready
Comment:
Same patch, but formatted better?
{{{
diff --git a/src/or/scheduler.c b/src/or/scheduler.c
index 2d6f7fc4b..32f34329c 100644
--- a/src/or/scheduler.c
+++ b/src/or/scheduler.c
@@ -371,12 +371,12 @@ 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();
}
/*
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23537#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list