aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2013-12-13 06:27:00 -0800
committerAndrea Shepard <andrea@torproject.org>2014-09-30 22:49:58 -0700
commit85ee07085281a1fa47d0b44b0addbb54fcfa6061 (patch)
tree3e6c09b202a38a41816a6a3fec6364f7e10f9e24 /src
parent8907554cf3e4e87515fecde40ae2088fdded523f (diff)
downloadtor-85ee07085281a1fa47d0b44b0addbb54fcfa6061.tar.gz
tor-85ee07085281a1fa47d0b44b0addbb54fcfa6061.zip
Make scheduler_release_channel() mockable
Diffstat (limited to 'src')
-rw-r--r--src/or/scheduler.c4
-rw-r--r--src/or/scheduler.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/or/scheduler.c b/src/or/scheduler.c
index 140ff2fef1..450eb02903 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 e2d2eb5192..9cdf6c1c4d 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);