aboutsummaryrefslogtreecommitdiff
path: root/src/or/statefile.c
diff options
context:
space:
mode:
authorvagrant <vagrant@precise32.(none)>2013-08-21 11:44:28 -0400
committerNick Mathewson <nickm@torproject.org>2013-08-22 10:15:56 -0400
commit4834641dce809fbb6fd4a586a823446970d19c1d (patch)
tree21808e3e34994b1e4255f3b7a106820a65ec2469 /src/or/statefile.c
parent7121e7bd15659052ccf42e554ae959a75cfacb45 (diff)
downloadtor-4834641dce809fbb6fd4a586a823446970d19c1d.tar
tor-4834641dce809fbb6fd4a586a823446970d19c1d.tar.gz
Make circ_times static and add accessor functions.
Change the global circ_times to a static variable and use accessor functions throughout the code, instead of accessing it directly.
Diffstat (limited to 'src/or/statefile.c')
-rw-r--r--src/or/statefile.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/statefile.c b/src/or/statefile.c
index 8736c35a2..4b61fde39 100644
--- a/src/or/statefile.c
+++ b/src/or/statefile.c
@@ -238,7 +238,8 @@ or_state_set(or_state_t *new_state)
tor_free(err);
ret = -1;
}
- if (circuit_build_times_parse_state(&circ_times, global_state) < 0) {
+ if (circuit_build_times_parse_state(
+ get_circuit_build_times(),global_state) < 0) {
ret = -1;
}
return ret;
@@ -405,7 +406,7 @@ or_state_save(time_t now)
* to avoid redundant writes. */
entry_guards_update_state(global_state);
rep_hist_update_state(global_state);
- circuit_build_times_update_state(&circ_times, global_state);
+ circuit_build_times_update_state(get_circuit_build_times(), global_state);
if (accounting_is_enabled(get_options()))
accounting_run_housekeeping(now);