diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-12-24 02:38:04 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-12-24 02:38:04 +0000 |
commit | df608fef4522d8c9a26e26c10a2ec95b7f74baa4 (patch) | |
tree | 0a8889242b6144db0b91a3cac9861fc1ff9eb40b /src/or/circuituse.c | |
parent | ac2f6b608a18a8595f62384788196d7c3f2875fd (diff) | |
download | tor-df608fef4522d8c9a26e26c10a2ec95b7f74baa4.tar.gz tor-df608fef4522d8c9a26e26c10a2ec95b7f74baa4.zip |
Checkpoint my big bug-891 patch.
svn:r17757
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r-- | src/or/circuituse.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c index 6b7bf7409d..5f9dabcb68 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -811,9 +811,14 @@ circuit_build_failed(origin_circuit_t *circ) if (n_conn) n_conn_id = n_conn->identity_digest; } else if (circ->_base.state == CIRCUIT_STATE_OR_WAIT && circ->_base.n_hop) { - /* we have to hunt for it */ n_conn_id = circ->_base.n_hop->identity_digest; +#if 0 + /* XXXX021 I believe this logic was wrong. If we're in state_or_wait, + * it's wrong to blame a particular connection for our failure to extend + * and set its is_bad_for_new_circs field: no connection ever got + * a chance to hear our CREATE cell. -NM*/ n_conn = connection_or_get_by_identity_digest(n_conn_id); +#endif } if (n_conn) { log_info(LD_OR, @@ -821,13 +826,13 @@ circuit_build_failed(origin_circuit_t *circ) "(%s:%d). I'm going to try to rotate to a better connection.", n_conn->_base.address, n_conn->_base.port); n_conn->is_bad_for_new_circs = 1; - entry_guard_register_connect_status(n_conn->identity_digest, 0, - time(NULL)); } - /* if there are any one-hop streams waiting on this circuit, fail - * them now so they can retry elsewhere. */ - if (n_conn_id) + if (n_conn_id) { + entry_guard_register_connect_status(n_conn_id, 0, time(NULL)); + /* if there are any one-hop streams waiting on this circuit, fail + * them now so they can retry elsewhere. */ connection_ap_fail_onehop(n_conn_id, circ->build_state); + } } switch (circ->_base.purpose) { |