summaryrefslogtreecommitdiff
path: root/src/or/circuitlist.c
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@fscked.org>2012-10-25 17:43:10 -0700
committerNick Mathewson <nickm@torproject.org>2012-12-07 10:34:09 -0500
commit42e3c04a7a5fb47a97766e54c72885c5c2bf23a9 (patch)
tree8152658f1006592a3b35d88e8fcf7d1c4ae9ad0f /src/or/circuitlist.c
parentbd93ff8dd76b06ca3afe1f362b086d4f12639f71 (diff)
downloadtor-42e3c04a7a5fb47a97766e54c72885c5c2bf23a9.tar.gz
tor-42e3c04a7a5fb47a97766e54c72885c5c2bf23a9.zip
Bug 3443: Don't count ORconn setup in circuit build time.
Also, add a hack Roger suggested where we're more patient if no circuits are opened yet.
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r--src/or/circuitlist.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index abb83954a4..8f06c0679e 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -555,6 +555,11 @@ init_circuit_base(circuit_t *circ)
{
tor_gettimeofday(&circ->timestamp_created);
+ // Gets reset when we send CREATE_FAST.
+ // circuit_expire_building() expects these to be equal
+ // until the orconn is built.
+ circ->timestamp_began = circ->timestamp_created;
+
circ->package_window = circuit_initial_package_window();
circ->deliver_window = CIRCWINDOW_START;
@@ -777,7 +782,7 @@ circuit_dump_conn_details(int severity,
"state %d (%s), born %ld:",
conn_array_index, type, this_circid, other_circid, circ->state,
circuit_state_to_string(circ->state),
- (long)circ->timestamp_created.tv_sec);
+ (long)circ->timestamp_began.tv_sec);
if (CIRCUIT_IS_ORIGIN(circ)) { /* circ starts at this node */
circuit_log_path(severity, LD_CIRC, TO_ORIGIN_CIRCUIT(circ));
}
@@ -840,7 +845,7 @@ circuit_dump_chan_details(int severity,
"state %d (%s), born %ld:",
chan, type, this_circid, other_circid, circ->state,
circuit_state_to_string(circ->state),
- (long)circ->timestamp_created.tv_sec);
+ (long)circ->timestamp_began.tv_sec);
if (CIRCUIT_IS_ORIGIN(circ)) { /* circ starts at this node */
circuit_log_path(severity, LD_CIRC, TO_ORIGIN_CIRCUIT(circ));
}