[tor-commits] [tor/master] Add some logging and comments.
nickm at torproject.org
nickm at torproject.org
Wed Nov 30 17:02:43 UTC 2011
commit 1c2c3314a9b8990533cc8632d0a02aa5f79950b6
Author: Linus Nordberg <linus at nordberg.se>
Date: Thu Nov 24 17:40:10 2011 +0100
Add some logging and comments.
---
src/or/circuitbuild.c | 4 ++--
src/or/connection.c | 1 +
src/or/directory.c | 6 ++++--
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index b04bd10..1cfeb03 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -5179,8 +5179,8 @@ learned_bridge_descriptor(routerinfo_t *ri, int from_cache)
rewrite_node_address_for_bridge(bridge, node);
add_an_entry_guard(node, 1, 1);
- log_notice(LD_DIR, "new bridge descriptor '%s' (%s)", ri->nickname,
- from_cache ? "cached" : "fresh");
+ log_notice(LD_DIR, "new bridge descriptor '%s' (%s): %s", ri->nickname,
+ from_cache ? "cached" : "fresh", router_describe(ri));
/* set entry->made_contact so if it goes down we don't drop it from
* our entry node list */
entry_guard_register_connect_status(ri->cache_info.identity_digest,
diff --git a/src/or/connection.c b/src/or/connection.c
index 897b0c9..af8663e 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1935,6 +1935,7 @@ retry_all_listeners(smartlist_t *replaced_conns,
smartlist_free(listeners);
+ /* XXXprop186 should take all advertised ports into account */
if (old_or_port != router_get_advertised_or_port(options) ||
old_dir_port != router_get_advertised_dir_port(options, 0)) {
/* Our chosen ORPort or DirPort is not what it used to be: the
diff --git a/src/or/directory.c b/src/or/directory.c
index a9ce483..43bef5c 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -1619,9 +1619,11 @@ connection_dir_client_reached_eof(dir_connection_t *conn)
if (!reason) reason = tor_strdup("[no reason given]");
log_debug(LD_DIR,
- "Received response from directory server '%s:%d': %d %s",
+ "Received response from directory server '%s:%d': %d %s "
+ "(purpose: %d)",
conn->_base.address, conn->_base.port, status_code,
- escaped(reason));
+ escaped(reason),
+ conn->_base.purpose);
/* now check if it's got any hints for us about our IP address. */
if (conn->dirconn_direct) {
More information about the tor-commits
mailing list