commit 99d312c2937c0289eec047a70f626e3976a25895 Author: Andrea Shepard andrea@torproject.org Date: Mon Feb 3 12:52:28 2014 -0800
Make channel_flush_some_cells() mockable --- src/or/channel.c | 4 ++-- 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 ec44cce..edeee69 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 07a66eb..dd0ca36 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);
tor-commits@lists.torproject.org