diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2017-12-07 00:04:09 +0000 |
---|---|---|
committer | Mike Perry <mikeperry-git@torproject.org> | 2017-12-07 00:04:38 +0000 |
commit | ed89588c4fa672eb8a85c8c5cdce4f7ec08bc9d8 (patch) | |
tree | 8d52b6a7a71ddf8aedcff9fa28f6d82776f1e560 /src/or/circuitlist.h | |
parent | b5d4cd1b4178bfa285fc5c512a29daa2580d96b8 (diff) | |
download | tor-ed89588c4fa672eb8a85c8c5cdce4f7ec08bc9d8.tar.gz tor-ed89588c4fa672eb8a85c8c5cdce4f7ec08bc9d8.zip |
Bug #23114: Time out circuits immediately.
This changes the purpose of circuits that are past the timeout to measurement
*as they are built*, ensuring accurate application of the timeout logic.
Diffstat (limited to 'src/or/circuitlist.h')
-rw-r--r-- | src/or/circuitlist.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/circuitlist.h b/src/or/circuitlist.h index c90f5445d8..6371e913ae 100644 --- a/src/or/circuitlist.h +++ b/src/or/circuitlist.h @@ -17,6 +17,10 @@ MOCK_DECL(smartlist_t *, circuit_get_global_list, (void)); smartlist_t *circuit_get_global_origin_circuit_list(void); +int circuit_any_opened_circuits(void); +int circuit_any_opened_circuits_cached(void); +void circuit_cache_opened_circuit_state(int circuits_are_opened); + const char *circuit_state_to_string(int state); const char *circuit_purpose_to_controller_string(uint8_t purpose); const char *circuit_purpose_to_controller_hs_state_string(uint8_t purpose); @@ -58,7 +62,7 @@ void circuit_mark_all_dirty_circs_as_unusable(void); MOCK_DECL(void, circuit_mark_for_close_, (circuit_t *circ, int reason, int line, const char *file)); int circuit_get_cpath_len(origin_circuit_t *circ); -int circuit_get_cpath_opened_len(origin_circuit_t *); +int circuit_get_cpath_opened_len(const origin_circuit_t *); void circuit_clear_cpath(origin_circuit_t *circ); crypt_path_t *circuit_get_cpath_hop(origin_circuit_t *circ, int hopnum); void circuit_get_all_pending_on_channel(smartlist_t *out, |