summaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-05-15 21:58:46 -0400
committerNick Mathewson <nickm@torproject.org>2011-05-15 21:58:46 -0400
commitb95dd03e5f6505ce2e78fe34a20bf5e5c970e6eb (patch)
treed60ca6da0feb52fc330ffa88ff871e6c35781e63 /src/or/directory.c
parentede102fd4675af8ac4060767f0348f3c93617e80 (diff)
downloadtor-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/directory.c')
-rw-r--r--src/or/directory.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 347ed42cb8..b238be2abc 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -525,8 +525,9 @@ directory_initiate_command_routerstatus_rend(routerstatus_t *status,
router = router_get_by_digest(status->identity_digest);
if (!router && anonymized_connection) {
- log_info(LD_DIR, "Not sending anonymized request to directory '%s'; we "
- "don't have its router descriptor.", status->nickname);
+ log_info(LD_DIR, "Not sending anonymized request to directory %s; we "
+ "don't have its router descriptor.",
+ routerstatus_describe(status));
return;
} else if (router) {
address = router->address;
@@ -539,10 +540,10 @@ directory_initiate_command_routerstatus_rend(routerstatus_t *status,
if (options->ExcludeNodes && options->StrictNodes &&
routerset_contains_routerstatus(options->ExcludeNodes, status)) {
- log_warn(LD_DIR, "Wanted to contact directory mirror '%s' for %s, but "
+ log_warn(LD_DIR, "Wanted to contact directory mirror %s for %s, but "
"it's in our ExcludedNodes list and StrictNodes is set. "
"Skipping. This choice might make your Tor not work.",
- status->nickname,
+ routerstatus_describe(status),
dir_conn_purpose_to_string(dir_purpose));
return;
}