diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-11-25 12:53:00 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-12-16 11:06:16 -0500 |
commit | 2ea5aa71823f385e36f20e643a20996dcb164464 (patch) | |
tree | 3a1d70c711bdd1fdf0917c2b43bf8c9fb8f3b2a4 /src/or/circuitlist.c | |
parent | e56bc1e5de05d9bc6876d91d364d33f0771eb322 (diff) | |
download | tor-2ea5aa71823f385e36f20e643a20996dcb164464.tar.gz tor-2ea5aa71823f385e36f20e643a20996dcb164464.zip |
Expire circuits that have been WAITING_FOR_BETTER_GUARD too long
(This is required by 3.9 in prop271, but is better done as a
separate function IMO)
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r-- | src/or/circuitlist.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index 9d7a5d7f0e..0afe2f8059 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -553,7 +553,7 @@ circuit_close_all_marked(void) smartlist_clear(circuits_pending_close); } -/** Return the head of the global linked list of circuits. */ +/** Return a pointer to the global list of circuits. */ MOCK_IMPL(smartlist_t *, circuit_get_global_list,(void)) { @@ -562,6 +562,16 @@ circuit_get_global_list,(void)) return global_circuitlist; } +/** */ +/** Return a pointer to the global list of origin circuits. */ +smartlist_t * +circuit_get_global_origin_circuit_list(void) +{ + if (NULL == global_origin_circuit_list) + global_origin_circuit_list = smartlist_new(); + return global_circuitlist; +} + /** Function to make circ-\>state human-readable */ const char * circuit_state_to_string(int state) |