aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-02-24 13:05:25 -0500
committerNick Mathewson <nickm@torproject.org>2014-02-24 13:05:25 -0500
commitd21b24b3b6f4d8203c44cec7709a7f7a12a540df (patch)
treefb357cfbd27e281568b00a96fd31029ba659effa /src/or/circuitlist.c
parente616f5b51312fef55099f2a7cd93af58d2b08032 (diff)
parent1068e50aecefac8469991884afc08b6ecb24e740 (diff)
downloadtor-d21b24b3b6f4d8203c44cec7709a7f7a12a540df.tar
tor-d21b24b3b6f4d8203c44cec7709a7f7a12a540df.tar.gz
Merge remote-tracking branch 'public/feature9777_024_squashed' into maint-0.2.4
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r--src/or/circuitlist.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index b0e24a5fe..c7b15e40b 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -709,7 +709,7 @@ circuit_free_cpath(crypt_path_t *cpath)
if (!cpath)
return;
- /* it's a doubly linked list, so we have to notice when we've
+ /* it's a circular list, so we have to notice when we've
* gone through it once. */
while (cpath->next && cpath->next != head) {
victim = cpath;
@@ -720,6 +720,14 @@ circuit_free_cpath(crypt_path_t *cpath)
circuit_free_cpath_node(cpath);
}
+/** Remove all the items in the cpath on <b>circ</b>.*/
+void
+circuit_clear_cpath(origin_circuit_t *circ)
+{
+ circuit_free_cpath(circ->cpath);
+ circ->cpath = NULL;
+}
+
/** Release all storage held by circuits. */
void
circuit_free_all(void)