summaryrefslogtreecommitdiff
path: root/src/or/circuitlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-01-13 09:52:07 -0500
committerNick Mathewson <nickm@torproject.org>2014-02-12 12:48:20 -0500
commit9a07ec751ff73062b958a8fc9f8437bed72e144c (patch)
treef603ecc2eed23118c7e848f0a80d0b00a665e262 /src/or/circuitlist.c
parent52d222aafbc21d674624fdd4c8fc834a40af69c7 (diff)
downloadtor-9a07ec751ff73062b958a8fc9f8437bed72e144c.tar.gz
tor-9a07ec751ff73062b958a8fc9f8437bed72e144c.zip
Refactor OOM-handling functions for more testability
This patch splits out some of the functions in OOM handling so that it's easier to check them without involving the rest of Tor or requiring that the circuits be "wired up".
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r--src/or/circuitlist.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index eb652301ed..618a42ed36 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -1435,9 +1435,9 @@ circuit_mark_all_dirty_circs_as_unusable(void)
* - If circ->rend_splice is set (we are the midpoint of a joined
* rendezvous stream), then mark the other circuit to close as well.
*/
-void
-circuit_mark_for_close_(circuit_t *circ, int reason, int line,
- const char *file)
+MOCK_IMPL(void,
+circuit_mark_for_close_, (circuit_t *circ, int reason, int line,
+ const char *file))
{
int orig_reason = reason; /* Passed to the controller */
assert_circuit_ok(circ);