Add some logging and comments.

This commit is contained in:
Linus Nordberg 2011-11-24 17:40:10 +01:00 committed by Nick Mathewson
parent 19a82d2936
commit 1c2c3314a9
3 changed files with 7 additions and 4 deletions

View File

@ -5179,8 +5179,8 @@ learned_bridge_descriptor(routerinfo_t *ri, int from_cache)
rewrite_node_address_for_bridge(bridge, node); rewrite_node_address_for_bridge(bridge, node);
add_an_entry_guard(node, 1, 1); add_an_entry_guard(node, 1, 1);
log_notice(LD_DIR, "new bridge descriptor '%s' (%s)", ri->nickname, log_notice(LD_DIR, "new bridge descriptor '%s' (%s): %s", ri->nickname,
from_cache ? "cached" : "fresh"); from_cache ? "cached" : "fresh", router_describe(ri));
/* set entry->made_contact so if it goes down we don't drop it from /* set entry->made_contact so if it goes down we don't drop it from
* our entry node list */ * our entry node list */
entry_guard_register_connect_status(ri->cache_info.identity_digest, entry_guard_register_connect_status(ri->cache_info.identity_digest,

View File

@ -1935,6 +1935,7 @@ retry_all_listeners(smartlist_t *replaced_conns,
smartlist_free(listeners); smartlist_free(listeners);
/* XXXprop186 should take all advertised ports into account */
if (old_or_port != router_get_advertised_or_port(options) || if (old_or_port != router_get_advertised_or_port(options) ||
old_dir_port != router_get_advertised_dir_port(options, 0)) { old_dir_port != router_get_advertised_dir_port(options, 0)) {
/* Our chosen ORPort or DirPort is not what it used to be: the /* Our chosen ORPort or DirPort is not what it used to be: the

View File

@ -1619,9 +1619,11 @@ connection_dir_client_reached_eof(dir_connection_t *conn)
if (!reason) reason = tor_strdup("[no reason given]"); if (!reason) reason = tor_strdup("[no reason given]");
log_debug(LD_DIR, 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, 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. */ /* now check if it's got any hints for us about our IP address. */
if (conn->dirconn_direct) { if (conn->dirconn_direct) {