[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
Fri Sep 15 20:28:38 UTC 2017


#23537: Allow the new sched to respond to a new conensus, not the old one.
------------------------------+--------------------------------
     Reporter:  pastly        |      Owner:  (none)
         Type:  defect        |     Status:  new
     Priority:  Medium        |  Milestone:  Tor: 0.3.2.x-final
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  tor-sched, easy
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+--------------------------------
 If the sched hears about a new consensus, we should switch schedulers
 first. Then tell the scheduler implementation about the new consensus. It
 doesn't make sense to have the old one respond to the new consensus right
 before we stop using it.

 {{{
 @@ -371,12 +369,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();
  }

  /*
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23537>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list