diff options
author | Roger Dingledine <arma@torproject.org> | 2009-01-06 22:20:31 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2009-01-06 22:20:31 +0000 |
commit | bf33182459a09461dcbe744421957b676951c6bd (patch) | |
tree | 296b20885b341309101e8c7a55cbfc55c93fae52 /src/or | |
parent | c052494a4f17a88b052e14a4d8dadd45cec841fb (diff) | |
download | tor-bf33182459a09461dcbe744421957b676951c6bd.tar.gz tor-bf33182459a09461dcbe744421957b676951c6bd.zip |
well, that was a disaster. this time for sure.
svn:r17989
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/circuituse.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c index 15e705048b..f2c1595c3b 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -801,17 +801,18 @@ circuit_build_failed(origin_circuit_t *circ) circ->cpath->state != CPATH_STATE_OPEN) { /* We failed at the first hop. If there's an OR connection to blame, blame it. */ - const char *n_conn_id = circ->_base.n_hop->identity_digest; + const char *n_conn_id = circ->_base.n_hop ? + circ->_base.n_hop->identity_digest : NULL; if (circ->_base.n_conn) { or_connection_t *n_conn = circ->_base.n_conn; + if (n_conn) n_conn_id = n_conn->identity_digest; log_info(LD_OR, "Our circuit failed to get a response from the first hop " "(%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; } - if (circ->_base.n_hop) { - const char *n_conn_id = circ->_base.n_hop->identity_digest; + 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. */ |