[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Make channel_note_destroy_not_pending() mockable
commit 8907554cf3e4e87515fecde40ae2088fdded523f
Author: Andrea Shepard <andrea@xxxxxxxxxxxxxx>
Date: Fri Dec 13 06:13:05 2013 -0800
Make channel_note_destroy_not_pending() mockable
---
src/or/circuitlist.c | 4 ++--
src/or/circuitlist.h | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index 9d72ea1..7b4eda3 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -302,8 +302,8 @@ channel_note_destroy_pending(channel_t *chan, circid_t id)
/** Called to indicate that a DESTROY is no longer pending on <b>chan</b> with
* circuit ID <b>id</b> -- typically, because it has been sent. */
-void
-channel_note_destroy_not_pending(channel_t *chan, circid_t id)
+MOCK_IMPL(void, channel_note_destroy_not_pending,
+ (channel_t *chan, circid_t id))
{
circuit_t *circ = circuit_get_by_circid_channel_even_if_marked(id,chan);
if (circ) {
diff --git a/src/or/circuitlist.h b/src/or/circuitlist.h
index 03934f9..a8d746b 100644
--- a/src/or/circuitlist.h
+++ b/src/or/circuitlist.h
@@ -72,7 +72,8 @@ void circuit_free_all(void);
void circuits_handle_oom(size_t current_allocation);
void channel_note_destroy_pending(channel_t *chan, circid_t id);
-void channel_note_destroy_not_pending(channel_t *chan, circid_t id);
+MOCK_DECL(void, channel_note_destroy_not_pending,
+ (channel_t *chan, circid_t id));
#ifdef CIRCUITLIST_PRIVATE
STATIC void circuit_free(circuit_t *circ);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits