[tor-bugs] #24531 [Core Tor/Tor]: sched: Add function to change scheduler state and always use it
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Dec 7 15:04:20 UTC 2017
#24531: sched: Add function to change scheduler state and always use it
-----------------------------+------------------------------------
Reporter: pastly | Owner: (none)
Type: defect | Status: needs_revision
Priority: Medium | Milestone: Tor: 0.3.3.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: needs_review => needs_revision
Comment:
The patch as provided needs revision.
- `==` are not assignments.
- function definitions need types for their arguments (unlike pseudocode)
- `scheduler_set_channel` is not a good name for the function
- "Function to log and change all the old and new states" does not
describe what the function does
And this is just plain wrong
{{{
@@ -707,7 +712,7 @@ scheduler_bug_occurred(const channel_t *chan)
" Num cells on cmux: %d. Connection outbuf len: %lu.",
chan->global_identifier,
channel_state_to_string(chan->state),
- chan->scheduler_state, circuitmux_num_cells(chan->cmux),
+ scheduler_set_channel(chan,new_state),
circuitmux_num_cells(chan->cmux),
(unsigned long)outbuf_len);
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24531#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list