summaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-04-30 23:24:38 +0000
committerRoger Dingledine <arma@torproject.org>2007-04-30 23:24:38 +0000
commit590c6ff33d9e8abf51d2d06a271ac4dc9d940496 (patch)
tree9ebb32a5b5572e4aa7c31f2bdca5ce5f8ebb9269 /src/or/connection_edge.c
parent95734e73ffd7c7225ba66554c2653619384e1be2 (diff)
downloadtor-590c6ff33d9e8abf51d2d06a271ac4dc9d940496.tar.gz
tor-590c6ff33d9e8abf51d2d06a271ac4dc9d940496.zip
identify the exit node correctly when we timeout and detach
from a circuit, even if the exit node is in the middle. there are probably a few more places that need this fix too. svn:r10076
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r--src/or/connection_edge.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 34d640014d..3af8044c22 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -346,7 +346,6 @@ connection_ap_expire_beginning(void)
connection_t **carray;
edge_connection_t *conn;
circuit_t *circ;
- const char *nickname;
int n, i;
time_t now = time(NULL);
or_options_t *options = get_options();
@@ -407,13 +406,12 @@ connection_ap_expire_beginning(void)
continue;
}
tor_assert(circ->purpose == CIRCUIT_PURPOSE_C_GENERAL);
- nickname = build_state_get_exit_nickname(
- TO_ORIGIN_CIRCUIT(circ)->build_state);
log_fn(cutoff < 15 ? LOG_INFO : severity, LD_APP,
"We tried for %d seconds to connect to '%s' using exit '%s'."
" Retrying on a new circuit.",
seconds_idle, safe_str(conn->socks_request->address),
- nickname ? nickname : "*unnamed*");
+ conn->cpath_layer ?
+ conn->cpath_layer->extend_info->nickname : "*unnamed*");
/* send an end down the circuit */
connection_edge_end(conn, END_STREAM_REASON_TIMEOUT);
/* un-mark it as ending, since we're going to reuse it */
@@ -1180,7 +1178,7 @@ addressmap_get_mappings(smartlist_t *sl, time_t min_expires,
* rendezvous descriptor is already here and fresh enough).
*
* The stream will exit from the hop
- * indicatd by <b>cpath</b>, or to the last hop in circ's cpath if
+ * indicated by <b>cpath</b>, or from the last hop in circ's cpath if
* <b>cpath</b> is NULL.
*/
int