commit 85ee07085281a1fa47d0b44b0addbb54fcfa6061 Author: Andrea Shepard andrea@torproject.org Date: Fri Dec 13 06:27:00 2013 -0800
Make scheduler_release_channel() mockable --- src/or/scheduler.c | 4 ++-- src/or/scheduler.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/or/scheduler.c b/src/or/scheduler.c index 140ff2f..450eb02 100644 --- a/src/or/scheduler.c +++ b/src/or/scheduler.c @@ -360,8 +360,8 @@ scheduler_retrigger(void)
/** Notify the scheduler of a channel being closed */
-void -scheduler_release_channel(channel_t *chan) +MOCK_IMPL(void, +scheduler_release_channel,(channel_t *chan)) { tor_assert(chan); tor_assert(channels_pending); diff --git a/src/or/scheduler.h b/src/or/scheduler.h index e2d2eb5..9cdf6c1 100644 --- a/src/or/scheduler.h +++ b/src/or/scheduler.h @@ -11,6 +11,7 @@
#include "or.h" #include "channel.h" +#include "testsupport.h"
/* Global-visibility scheduler functions */
@@ -25,7 +26,7 @@ void scheduler_channel_has_waiting_cells(channel_t *chan); void scheduler_channel_wants_writes(channel_t *chan);
/* Notify the scheduler of a channel being closed */ -void scheduler_release_channel(channel_t *chan); +MOCK_DECL(void,scheduler_release_channel,(channel_t *chan));
/* Notify scheduler of queue size adjustments */ void scheduler_adjust_queue_size(channel_t *chan, char dir, uint64_t adj);