[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Make circuitmux_num_cells() mockable
commit 5b7a58f7c43c98c1f1fbb6bc347263c5247a5ab7
Author: Andrea Shepard <andrea@xxxxxxxxxxxxxx>
Date: Wed Jan 22 01:00:25 2014 -0800
Make circuitmux_num_cells() mockable
---
src/or/circuitmux.c | 4 ++--
src/or/circuitmux.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/or/circuitmux.c b/src/or/circuitmux.c
index 29c3be1..71bc4ef 100644
--- a/src/or/circuitmux.c
+++ b/src/or/circuitmux.c
@@ -896,8 +896,8 @@ circuitmux_num_cells_for_circuit(circuitmux_t *cmux, circuit_t *circ)
* Query total number of available cells on a circuitmux
*/
-unsigned int
-circuitmux_num_cells(circuitmux_t *cmux)
+MOCK_IMPL(unsigned int,
+circuitmux_num_cells, (circuitmux_t *cmux))
{
tor_assert(cmux);
diff --git a/src/or/circuitmux.h b/src/or/circuitmux.h
index 5833ee5..9a5ea7d 100644
--- a/src/or/circuitmux.h
+++ b/src/or/circuitmux.h
@@ -120,7 +120,7 @@ int circuitmux_is_circuit_attached(circuitmux_t *cmux, circuit_t *circ);
int circuitmux_is_circuit_active(circuitmux_t *cmux, circuit_t *circ);
unsigned int circuitmux_num_cells_for_circuit(circuitmux_t *cmux,
circuit_t *circ);
-unsigned int circuitmux_num_cells(circuitmux_t *cmux);
+MOCK_DECL(unsigned int, circuitmux_num_cells, (circuitmux_t *cmux));
unsigned int circuitmux_num_circuits(circuitmux_t *cmux);
unsigned int circuitmux_num_active_circuits(circuitmux_t *cmux);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits