summaryrefslogtreecommitdiff
path: root/src/test/test_scheduler.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-03-26 19:33:44 +0200
committerNick Mathewson <nickm@torproject.org>2017-06-21 14:03:00 -0400
commit1c0a2335cd27ed4f4a61f99ce19b5ba08639eeff (patch)
treef21a4d88f2436a9b0e810615fe8478f553a26d8a /src/test/test_scheduler.c
parent0895808023b023a8eff00c6b6eb27c4ec4b40191 (diff)
downloadtor-1c0a2335cd27ed4f4a61f99ce19b5ba08639eeff.tar.gz
tor-1c0a2335cd27ed4f4a61f99ce19b5ba08639eeff.zip
Extract channel_do_open_actions() from non-open _change_state cases
This reduces the size of the largest SCC in the callgraph by 30 functions, from 58 to 28.
Diffstat (limited to 'src/test/test_scheduler.c')
-rw-r--r--src/test/test_scheduler.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test_scheduler.c b/src/test/test_scheduler.c
index 4c536b0905..a2e77a45d4 100644
--- a/src/test/test_scheduler.c
+++ b/src/test/test_scheduler.c
@@ -567,7 +567,7 @@ test_scheduler_loop(void *arg)
channel_register(ch1);
tt_assert(ch1->registered);
/* Finish opening it */
- channel_change_state(ch1, CHANNEL_STATE_OPEN);
+ channel_change_state_open(ch1);
/* It should start off in SCHED_CHAN_IDLE */
tt_int_op(ch1->scheduler_state, ==, SCHED_CHAN_IDLE);
@@ -636,7 +636,7 @@ test_scheduler_loop(void *arg)
tt_int_op(smartlist_len(channels_pending), ==, 0);
/* Now, finish opening ch2, and get both back to pending */
- channel_change_state(ch2, CHANNEL_STATE_OPEN);
+ channel_change_state_open(ch2);
scheduler_channel_wants_writes(ch1);
scheduler_channel_wants_writes(ch2);
scheduler_channel_has_waiting_cells(ch1);