[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r10076: identify the exit node correctly when we timeout and detach (tor/trunk/src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r10076: identify the exit node correctly when we timeout and detach (tor/trunk/src/or)
- From: arma@xxxxxxxx
- Date: Mon, 30 Apr 2007 19:24:40 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Mon, 30 Apr 2007 19:24:50 -0400
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: arma
Date: 2007-04-30 19:24:38 -0400 (Mon, 30 Apr 2007)
New Revision: 10076
Modified:
tor/trunk/src/or/circuituse.c
tor/trunk/src/or/connection_edge.c
Log:
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.
Modified: tor/trunk/src/or/circuituse.c
===================================================================
--- tor/trunk/src/or/circuituse.c 2007-04-30 22:43:01 UTC (rev 10075)
+++ tor/trunk/src/or/circuituse.c 2007-04-30 23:24:38 UTC (rev 10076)
@@ -1190,7 +1190,7 @@
/** Attempt to attach the connection <b>conn</b> to <b>circ</b>, and send a
* begin or resolve cell as appropriate. Return values are as for
* connection_ap_handshake_attach_circuit. 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
connection_ap_handshake_attach_chosen_circuit(edge_connection_t *conn,
Modified: tor/trunk/src/or/connection_edge.c
===================================================================
--- tor/trunk/src/or/connection_edge.c 2007-04-30 22:43:01 UTC (rev 10075)
+++ tor/trunk/src/or/connection_edge.c 2007-04-30 23:24:38 UTC (rev 10076)
@@ -346,7 +346,6 @@
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 @@
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 @@
* 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