diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-10-17 15:20:00 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-10-17 15:20:00 +0000 |
commit | b713b370bfdd2be8f1456d11f7e087c9cf7cdee7 (patch) | |
tree | 2f9e2c06a9f0a042f56b06a96f66456fde68d07b /src/or/circuituse.c | |
parent | e3b1d059c7f17bf82cf9ac80a50642bb4db6dffe (diff) | |
download | tor-b713b370bfdd2be8f1456d11f7e087c9cf7cdee7.tar.gz tor-b713b370bfdd2be8f1456d11f7e087c9cf7cdee7.zip |
r9060@totoro: nickm | 2006-10-17 11:12:48 -0400
Apply patch from Mike Perry: add more reasons for circuit destroys. (Slightly tweaked to avoid allocating a number for an "internal" reason.)
svn:r8739
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r-- | src/or/circuituse.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c index 9e3de14a8e..84b642fbe4 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -265,8 +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); + circuit_mark_for_close(victim, END_CIRC_REASON_TIMEOUT); } } @@ -584,8 +583,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); + circuit_mark_for_close(circ, END_CIRC_REASON_FINISHED); } else if (!circ->timestamp_dirty && circ->state == CIRCUIT_STATE_OPEN && circ->purpose == CIRCUIT_PURPOSE_C_GENERAL) { @@ -593,8 +591,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); + circuit_mark_for_close(circ, END_CIRC_REASON_FINISHED); } } } |