aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-10-09 15:47:50 +0000
committerNick Mathewson <nickm@torproject.org>2006-10-09 15:47:50 +0000
commit26283e69ba88896d8aeb9141bdaeff15be916ec8 (patch)
tree377a1490710afcdd83ebd6e26559a74a1e0a6e9d /src/or/circuituse.c
parentb76fd968b4d2deddf2f40f63dc04713f45649c68 (diff)
downloadtor-26283e69ba88896d8aeb9141bdaeff15be916ec8.tar
tor-26283e69ba88896d8aeb9141bdaeff15be916ec8.tar.gz
r8973@totoro: nickm | 2006-10-09 11:45:47 -0400
Touch up last patch (to add REASON to CIRC events): make some reasons more sensible, send reasons only to controllers that have enabled extended events, and clean up whitespace. svn:r8672
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 65bf2f9e6..487692607 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -265,6 +265,7 @@ circuit_expire_building(time_t now)
circuit_state_to_string(victim->state), victim->purpose);
circuit_log_path(LOG_INFO,LD_CIRC,TO_ORIGIN_CIRCUIT(victim));
+ /* XXXX Should there be a timeout reason? CONNECTFAILED isn't right. */
circuit_mark_for_close(victim, END_CIRC_REASON_CONNECTFAILED);
}
}
@@ -583,6 +584,7 @@ circuit_expire_old_circuits(time_t now)
log_debug(LD_CIRC, "Closing n_circ_id %d (dirty %d secs ago, purp %d)",
circ->n_circ_id, (int)(now - circ->timestamp_dirty),
circ->purpose);
+ /* XXXX Should there be a timeout reason? REQUESTED isn't right. */
circuit_mark_for_close(circ, END_CIRC_REASON_REQUESTED);
} else if (!circ->timestamp_dirty &&
circ->state == CIRCUIT_STATE_OPEN &&
@@ -591,6 +593,7 @@ circuit_expire_old_circuits(time_t now)
log_debug(LD_CIRC,
"Closing circuit that has been unused for %d seconds.",
(int)(now - circ->timestamp_created));
+ /* XXXX Should there be a timeout reason? REQUESTED isn't right. */
circuit_mark_for_close(circ, END_CIRC_REASON_REQUESTED);
}
}