diff options
author | Roger Dingledine <arma@torproject.org> | 2006-04-09 21:36:37 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-04-09 21:36:37 +0000 |
commit | 21263982e436601c9a4ae538413a5e2869e92f52 (patch) | |
tree | 97355740005e481694e00a31a27a4c91e78f3b33 /src/or/connection_edge.c | |
parent | b6b534c9dd34d9b4726321662c61b07cb2730bfa (diff) | |
download | tor-21263982e436601c9a4ae538413a5e2869e92f52.tar.gz tor-21263982e436601c9a4ae538413a5e2869e92f52.zip |
Don't yell loudly about failed internal/bridge connections. These
are reachability testing and rendserv upload/downloads, and they
have their own failure messages elsewhere.
svn:r6343
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index a11da1bbe1..cb0ffd848e 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -326,6 +326,7 @@ connection_ap_expire_beginning(void) int n, i; time_t now = time(NULL); or_options_t *options = get_options(); + int severity; get_connection_array(&carray, &n); @@ -333,9 +334,11 @@ connection_ap_expire_beginning(void) conn = carray[i]; if (conn->type != CONN_TYPE_AP) continue; + /* if it's an internal bridge connection, don't yell its status. */ + severity = (!conn->addr && !conn->port) ? LOG_INFO : LOG_NOTICE; if (conn->state == AP_CONN_STATE_CONTROLLER_WAIT) { if (now - conn->timestamp_lastread >= options->SocksTimeout) { - log_notice(LD_APP, "Closing unattached stream."); + log_fn(severity, LD_APP, "Closing unattached stream."); connection_mark_unattached_ap(conn, END_STREAM_REASON_TIMEOUT); } continue; @@ -355,11 +358,11 @@ connection_ap_expire_beginning(void) } if (circ->purpose == CIRCUIT_PURPOSE_C_REND_JOINED) { if (now - conn->timestamp_lastread > options->SocksTimeout) { - log_notice(LD_REND, - "Rend stream is %d seconds late. Giving up on address" - " '%s.onion'.", - (int)(now - conn->timestamp_lastread), - safe_str(conn->socks_request->address)); + log_fn(severity, LD_REND, + "Rend stream is %d seconds late. Giving up on address" + " '%s.onion'.", + (int)(now - conn->timestamp_lastread), + safe_str(conn->socks_request->address)); connection_edge_end(conn, END_STREAM_REASON_TIMEOUT, conn->cpath_layer); connection_mark_unattached_ap(conn, END_STREAM_REASON_TIMEOUT); @@ -368,12 +371,12 @@ connection_ap_expire_beginning(void) } tor_assert(circ->purpose == CIRCUIT_PURPOSE_C_GENERAL); nickname = build_state_get_exit_nickname(circ->build_state); - log_notice(LD_APP, - "We tried for %d seconds to connect to '%s' using exit '%s'." - " Retrying on a new circuit.", - (int)(now - conn->timestamp_lastread), - safe_str(conn->socks_request->address), - nickname ? nickname : "*unnamed*"); + log_fn(severity, LD_APP, + "We tried for %d seconds to connect to '%s' using exit '%s'." + " Retrying on a new circuit.", + (int)(now - conn->timestamp_lastread), + safe_str(conn->socks_request->address), + nickname ? nickname : "*unnamed*"); /* send an end down the circuit */ connection_edge_end(conn, END_STREAM_REASON_TIMEOUT, conn->cpath_layer); /* un-mark it as ending, since we're going to reuse it */ |