commit 452bce6c7200600d4810f490ba5cc1c93d49cc96 Author: Andrea Shepard andrea@torproject.org Date: Wed Jan 22 03:51:22 2014 -0800
Make channel_dump_statistics() mockable --- src/or/channel.c | 4 ++-- src/or/channel.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/or/channel.c b/src/or/channel.c index 94cca5c..ec44cce 100644 --- a/src/or/channel.c +++ b/src/or/channel.c @@ -3450,8 +3450,8 @@ chan_cell_queue_len(const chan_cell_queue_t *queue) * Dump statistics for one channel to the log */
-void -channel_dump_statistics(channel_t *chan, int severity) +MOCK_IMPL(void, +channel_dump_statistics, (channel_t *chan, int severity)) { double avg, interval, age; time_t now = time(NULL); diff --git a/src/or/channel.h b/src/or/channel.h index ba6d66b..07a66eb 100644 --- a/src/or/channel.h +++ b/src/or/channel.h @@ -506,7 +506,7 @@ channel_t * channel_next_with_digest(channel_t *chan); */
const char * channel_describe_transport(channel_t *chan); -void channel_dump_statistics(channel_t *chan, int severity); +MOCK_DECL(void, channel_dump_statistics, (channel_t *chan, int severity)); void channel_dump_transport_statistics(channel_t *chan, int severity); const char * channel_get_actual_remote_descr(channel_t *chan); const char * channel_get_actual_remote_address(channel_t *chan);