[or-cvs] [tor/release-0.2.2 036/162] no measurement circs if not enough build times
arma at torproject.org
arma at torproject.org
Mon Dec 20 03:06:30 UTC 2010
Author: Roger Dingledine <arma at torproject.org>
Date: Wed, 29 Sep 2010 18:05:10 -0400
Subject: no measurement circs if not enough build times
Commit: ceb3d4d578f4ebb8d0d1247adf895ccbab7f72db
In the first 100 circuits, our timeout_ms and close_ms
are the same. So we shouldn't transition circuits to purpose
CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT, since they will just timeout again
next time we check.
---
src/or/circuituse.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 66ee0c4..18ef0c8 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -384,7 +384,8 @@ circuit_expire_building(time_t now)
continue;
}
- if (circuit_timeout_want_to_count_circ(TO_ORIGIN_CIRCUIT(victim))) {
+ if (circuit_timeout_want_to_count_circ(TO_ORIGIN_CIRCUIT(victim)) &&
+ circuit_build_times_enough_to_compute(&circ_times)) {
/* Circuits are allowed to last longer for measurement.
* Switch their purpose and wait. */
if (victim->purpose != CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT) {
--
1.7.1
More information about the tor-commits
mailing list