diff options
author | Andrea Shepard <andrea@torproject.org> | 2014-02-03 12:52:28 -0800 |
---|---|---|
committer | Andrea Shepard <andrea@torproject.org> | 2014-09-30 23:14:59 -0700 |
commit | 99d312c2937c0289eec047a70f626e3976a25895 (patch) | |
tree | 316bca0b8f3a1759faf9d56485cc541cedf787a9 | |
parent | 684bcd886abb36414a1499ced1b038050f6face1 (diff) | |
download | tor-99d312c2937c0289eec047a70f626e3976a25895.tar.gz tor-99d312c2937c0289eec047a70f626e3976a25895.zip |
Make channel_flush_some_cells() mockable
-rw-r--r-- | src/or/channel.c | 4 | ||||
-rw-r--r-- | src/or/channel.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/or/channel.c b/src/or/channel.c index ec44cce427..edeee6937a 100644 --- a/src/or/channel.c +++ b/src/or/channel.c @@ -2197,8 +2197,8 @@ channel_listener_change_state(channel_listener_t *chan_l, #define MAX_CELLS_TO_GET_FROM_CIRCUITS_FOR_UNLIMITED 256 -ssize_t -channel_flush_some_cells(channel_t *chan, ssize_t num_cells) +MOCK_IMPL(ssize_t, +channel_flush_some_cells, (channel_t *chan, ssize_t num_cells)) { unsigned int unlimited = 0; ssize_t flushed = 0; diff --git a/src/or/channel.h b/src/or/channel.h index 07a66ebcda..dd0ca369cd 100644 --- a/src/or/channel.h +++ b/src/or/channel.h @@ -455,7 +455,8 @@ void channel_queue_var_cell(channel_t *chan, var_cell_t *var_cell); void channel_flush_cells(channel_t *chan); /* Request from lower layer for more cells if available */ -ssize_t channel_flush_some_cells(channel_t *chan, ssize_t num_cells); +MOCK_DECL(ssize_t, channel_flush_some_cells, + (channel_t *chan, ssize_t num_cells)); /* Query if data available on this channel */ int channel_more_to_flush(channel_t *chan); |