diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-08-21 12:10:05 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-08-22 10:15:56 -0400 |
commit | 775c491502e43f0490023b2917c4e1a05b38b5b8 (patch) | |
tree | fcde4b10787c0bbcf983f3811f5f4c45693aa21a /src/or/circuitstats.h | |
parent | e1c9b43b8efbc76ab3a6decf47d6d1ef1967ef77 (diff) | |
download | tor-775c491502e43f0490023b2917c4e1a05b38b5b8.tar.gz tor-775c491502e43f0490023b2917c4e1a05b38b5b8.zip |
Separate mutable/const accessors for circuit_build_times
(These have proved invaluable for other global accessors.)
Diffstat (limited to 'src/or/circuitstats.h')
-rw-r--r-- | src/or/circuitstats.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/or/circuitstats.h b/src/or/circuitstats.h index 4115b68654..196af3fab4 100644 --- a/src/or/circuitstats.h +++ b/src/or/circuitstats.h @@ -12,13 +12,14 @@ #ifndef TOR_CIRCUITSTATS_H #define TOR_CIRCUITSTATS_H -circuit_build_times_t *get_circuit_build_times(void); +const circuit_build_times_t *get_circuit_build_times(void); +circuit_build_times_t *get_circuit_build_times_mutable(void); double get_circuit_build_close_time_ms(void); double get_circuit_build_timeout_ms(void); int circuit_build_times_disabled(void); -int circuit_build_times_enough_to_compute(circuit_build_times_t *cbt); -void circuit_build_times_update_state(circuit_build_times_t *cbt, +int circuit_build_times_enough_to_compute(const circuit_build_times_t *cbt); +void circuit_build_times_update_state(const circuit_build_times_t *cbt, or_state_t *state); int circuit_build_times_parse_state(circuit_build_times_t *cbt, or_state_t *state); @@ -29,9 +30,9 @@ int circuit_build_times_count_close(circuit_build_times_t *cbt, void circuit_build_times_set_timeout(circuit_build_times_t *cbt); int circuit_build_times_add_time(circuit_build_times_t *cbt, build_time_t time); -int circuit_build_times_needs_circuits(circuit_build_times_t *cbt); +int circuit_build_times_needs_circuits(const circuit_build_times_t *cbt); -int circuit_build_times_needs_circuits_now(circuit_build_times_t *cbt); +int circuit_build_times_needs_circuits_now(const circuit_build_times_t *cbt); void circuit_build_times_init(circuit_build_times_t *cbt); void circuit_build_times_free_timeouts(circuit_build_times_t *cbt); void circuit_build_times_new_consensus_params(circuit_build_times_t *cbt, @@ -61,7 +62,7 @@ void circuitbuild_running_unit_tests(void); /* Network liveness functions */ void circuit_build_times_network_is_live(circuit_build_times_t *cbt); -int circuit_build_times_network_check_live(circuit_build_times_t *cbt); +int circuit_build_times_network_check_live(const circuit_build_times_t *cbt); void circuit_build_times_network_circ_success(circuit_build_times_t *cbt); #endif |