summaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@fscked.org>2010-06-15 01:13:49 -0700
committerMike Perry <mikeperry-git@fscked.org>2010-06-15 20:04:42 -0700
commitc6c8fbf852bb2ecee6387609e8cbf78a772c7e01 (patch)
treed240f87d82c54e3a59d5801519c45e0e6b2bde10 /src/or/circuituse.c
parentf528a6e62b75538a39b113f67e38fb947c80739e (diff)
downloadtor-c6c8fbf852bb2ecee6387609e8cbf78a772c7e01.tar.gz
tor-c6c8fbf852bb2ecee6387609e8cbf78a772c7e01.zip
Split the circuit timeout and close codepaths.
We need to record different statistics at point of timeout, vs the point of forcible closing. Also, give some better names to constants and state file variables to indicate they are not dealing with timeouts, but abandoned circuits.
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 5127ca6e3d..5027eb5a28 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -368,6 +368,8 @@ circuit_expire_building(time_t now)
* Switch their purpose and wait. */
if (victim->purpose != CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT) {
victim->purpose = CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT;
+ circuit_build_times_count_timeout(&circ_times,
+ first_hop_succeeded);
continue;
}
@@ -380,7 +382,7 @@ circuit_expire_building(time_t now)
log_notice(LD_CIRC,
"Extremely large value for circuit build timeout: %lds. "
"Assuming clock jump.", now - victim->timestamp_created);
- } else if (circuit_build_times_add_timeout(&circ_times,
+ } else if (circuit_build_times_count_close(&circ_times,
first_hop_succeeded,
victim->timestamp_created)) {
circuit_build_times_set_timeout(&circ_times);