Make scheduler_release_channel() mockable

This commit is contained in:
Andrea Shepard 2013-12-13 06:27:00 -08:00
parent 8907554cf3
commit 85ee070852
2 changed files with 4 additions and 3 deletions

View File

@ -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);

View File

@ -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);