diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-15 21:58:46 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-15 21:58:46 -0400 |
commit | b95dd03e5f6505ce2e78fe34a20bf5e5c970e6eb (patch) | |
tree | d60ca6da0feb52fc330ffa88ff871e6c35781e63 /src/or/connection_edge.c | |
parent | ede102fd4675af8ac4060767f0348f3c93617e80 (diff) | |
download | tor-b95dd03e5f6505ce2e78fe34a20bf5e5c970e6eb.tar.gz tor-b95dd03e5f6505ce2e78fe34a20bf5e5c970e6eb.zip |
Log descriptions of nodes, not just nicknames.
This patch introduces a few new functions in router.c to produce a
more helpful description of a node than its nickame, and then tweaks
nearly all log messages taking a nickname as an argument to call these
functions instead.
There are a few cases where I left the old log messages alone: in
these cases, the nickname was that of an authority (whose nicknames
are useful and unique), or the message already included an identity
and/or an address. I might have missed a couple more too.
This is a fix for bug 3045.
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 7828f16386..78b1b92de9 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -503,12 +503,12 @@ connection_ap_expire_beginning(void) } tor_assert(circ->purpose == CIRCUIT_PURPOSE_C_GENERAL); log_fn(cutoff < 15 ? LOG_INFO : severity, LD_APP, - "We tried for %d seconds to connect to '%s' using exit '%s'." + "We tried for %d seconds to connect to '%s' using exit %s." " Retrying on a new circuit.", seconds_idle, safe_str_client(conn->socks_request->address), conn->cpath_layer ? - conn->cpath_layer->extend_info->nickname : "*unnamed*"); + extend_info_describe(conn->cpath_layer->extend_info): "*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 */ @@ -1830,7 +1830,8 @@ connection_ap_handshake_rewrite_and_attach(edge_connection_t *conn, if (r) { log_info(LD_APP, "Redirecting address %s to exit at enclave router %s", - safe_str_client(socks->address), r->nickname); + safe_str_client(socks->address), + router_describe(r)); /* use the hex digest, not nickname, in case there are two routers with this nickname */ conn->chosen_exit_name = |