diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-01-14 13:31:20 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-01-14 13:31:20 -0500 |
commit | 08bbb6b8d921233e8d4780b4bc544022b91f1087 (patch) | |
tree | 151412e33fbbaf24fe35538110a1e8ade19515f0 /src/test/test_channel.c | |
parent | c948db425280f6d132fe0415617e73c63607d904 (diff) | |
parent | 59dac38ebe4e6489c2a06d07470023ed5fbdd0aa (diff) | |
download | tor-08bbb6b8d921233e8d4780b4bc544022b91f1087.tar.gz tor-08bbb6b8d921233e8d4780b4bc544022b91f1087.zip |
Merge branch 'ticket32892_043_01_squashed'
Diffstat (limited to 'src/test/test_channel.c')
-rw-r--r-- | src/test/test_channel.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/src/test/test_channel.c b/src/test/test_channel.c index aacafc9514..5b13f1f979 100644 --- a/src/test/test_channel.c +++ b/src/test/test_channel.c @@ -34,8 +34,6 @@ static int test_chan_accept_cells = 0; static int test_chan_fixed_cells_recved = 0; static cell_t * test_chan_last_seen_fixed_cell_ptr = NULL; -static int test_chan_var_cells_recved = 0; -static var_cell_t * test_chan_last_seen_var_cell_ptr = NULL; static int test_cells_written = 0; static int test_doesnt_want_writes_count = 0; static int test_dumpstats_calls = 0; @@ -113,24 +111,6 @@ chan_test_dumpstats(channel_t *ch, int severity) return; } -/* - * Handle an incoming variable-size cell for unit tests - */ - -static void -chan_test_var_cell_handler(channel_t *ch, - var_cell_t *var_cell) -{ - tt_assert(ch); - tt_assert(var_cell); - - test_chan_last_seen_var_cell_ptr = var_cell; - ++test_chan_var_cells_recved; - - done: - return; -} - static void chan_test_close(channel_t *ch) { @@ -492,11 +472,8 @@ test_channel_dumpstats(void *arg) /* Receive path */ channel_set_cell_handlers(ch, - chan_test_cell_handler, - chan_test_var_cell_handler); + chan_test_cell_handler); tt_ptr_op(channel_get_cell_handler(ch), OP_EQ, chan_test_cell_handler); - tt_ptr_op(channel_get_var_cell_handler(ch), OP_EQ, - chan_test_var_cell_handler); cell = tor_malloc_zero(sizeof(*cell)); old_count = test_chan_fixed_cells_recved; channel_process_cell(ch, cell); @@ -722,7 +699,7 @@ test_channel_inbound_cell(void *arg) /* Setup incoming cell handlers. We don't care about var cell, the channel * layers is not handling those. */ - channel_set_cell_handlers(chan, chan_test_cell_handler, NULL); + channel_set_cell_handlers(chan, chan_test_cell_handler); tt_ptr_op(chan->cell_handler, OP_EQ, chan_test_cell_handler); /* Now process the cell, we should see it. */ old_count = test_chan_fixed_cells_recved; |