[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r8727: clean up and downgrade some log messages (tor/trunk/src/or)
Author: arma
Date: 2006-10-15 03:42:51 -0400 (Sun, 15 Oct 2006)
New Revision: 8727
Modified:
tor/trunk/src/or/buffers.c
tor/trunk/src/or/circuituse.c
tor/trunk/src/or/directory.c
tor/trunk/src/or/relay.c
Log:
clean up and downgrade some log messages
Modified: tor/trunk/src/or/buffers.c
===================================================================
--- tor/trunk/src/or/buffers.c 2006-10-15 05:14:50 UTC (rev 8726)
+++ tor/trunk/src/or/buffers.c 2006-10-15 07:42:51 UTC (rev 8727)
@@ -1007,7 +1007,7 @@
"Your application (using socks5 on port %d) is giving "
"Tor only an IP address. Applications that do DNS resolves "
"themselves may leak information. Consider using Socks4A "
- "(e.g. via privoxy or socat) instead. For more information, "
+ "(e.g. via privoxy or socat) instead. For more information, "
"please see http://wiki.noreply.org/noreply/TheOnionRouter/"
"TorFAQ#SOCKSAndDNS.%s", req->port,
safe_socks ? " Rejecting." : "");
Modified: tor/trunk/src/or/circuituse.c
===================================================================
--- tor/trunk/src/or/circuituse.c 2006-10-15 05:14:50 UTC (rev 8726)
+++ tor/trunk/src/or/circuituse.c 2006-10-15 07:42:51 UTC (rev 8727)
@@ -905,7 +905,8 @@
if (exit_nickname) {
router = router_get_by_nickname(exit_nickname, 1);
if (!router) {
- log_warn(LD_GENERAL, "No such OR as '%s'", exit_nickname);
+ log_warn(LD_GENERAL, "Trying to launch circ by nickname, but "
+ "no such OR as '%s'", exit_nickname);
return NULL;
}
}
Modified: tor/trunk/src/or/directory.c
===================================================================
--- tor/trunk/src/or/directory.c 2006-10-15 05:14:50 UTC (rev 8726)
+++ tor/trunk/src/or/directory.c 2006-10-15 07:42:51 UTC (rev 8727)
@@ -202,7 +202,8 @@
resource, NULL, 0);
else {
log_notice(LD_DIR,
- "No running dirservers known. Will try again later. "
+ "While fetching directory info, "
+ "no running dirservers known. Will try again later. "
"(purpose %d)", purpose);
if (!purpose_is_private(purpose)) {
/* remember we tried them all and failed. */
Modified: tor/trunk/src/or/relay.c
===================================================================
--- tor/trunk/src/or/relay.c 2006-10-15 05:14:50 UTC (rev 8726)
+++ tor/trunk/src/or/relay.c 2006-10-15 07:42:51 UTC (rev 8727)
@@ -286,7 +286,8 @@
thishop = thishop->next;
} while (thishop != cpath && thishop->state == CPATH_STATE_OPEN);
- log_warn(LD_OR,"in-cell at client not recognized. Closing.");
+ log_fn(LOG_PROTOCOL_WARN, LD_OR,
+ "Incoming cell at client not recognized. Closing.");
return -1;
} else { /* we're in the middle. Just one crypt. */
if (relay_crypt_one_payload(TO_OR_CIRCUIT(circ)->p_crypto,
@@ -529,7 +530,7 @@
{
switch (reason) {
case -1:
- log_warn(LD_PROTOCOL,
+ log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
"End cell arrived with length 0. Should be at least 1.");
return "MALFORMED";
case END_STREAM_REASON_MISC: return "misc error";
@@ -545,7 +546,8 @@
case END_STREAM_REASON_CONNRESET: return "connection reset";
case END_STREAM_REASON_TORPROTOCOL: return "Tor protocol error";
default:
- log_warn(LD_PROTOCOL,"Reason for ending (%d) not recognized.",reason);
+ log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
+ "Reason for ending (%d) not recognized.",reason);
return "unknown";
}
}
@@ -589,8 +591,9 @@
case END_STREAM_REASON_NET_UNREACHABLE:
return SOCKS5_NET_UNREACHABLE;
default:
- log_warn(LD_PROTOCOL,"Reason for ending (%d) not recognized; "
- "sending generic socks error.", reason);
+ log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
+ "Reason for ending (%d) not recognized; "
+ "sending generic socks error.", reason);
return SOCKS5_GENERAL_ERROR;
}
}
@@ -819,8 +822,8 @@
rh->command == RELAY_COMMAND_CONNECTED) {
tor_assert(CIRCUIT_IS_ORIGIN(circ));
if (conn->_base.state != AP_CONN_STATE_CONNECT_WAIT) {
- log_warn(LD_APP,"Got 'connected' while not in state connect_wait. "
- "Dropping.");
+ log_fn(LOG_PROTOCOL_WARN, LD_APP,
+ "Got 'connected' while not in state connect_wait. Dropping.");
return 0;
}
// log_fn(LOG_INFO,"Connected! Notifying application.");
@@ -862,15 +865,16 @@
int ttl;
int answer_len;
if (conn->_base.state != AP_CONN_STATE_RESOLVE_WAIT) {
- log_warn(LD_APP,"Got a 'resolved' cell while not in state resolve_wait. "
- "Dropping.");
+ log_fn(LOG_PROTOCOL_WARN, LD_APP, "Got a 'resolved' cell while "
+ "not in state resolve_wait. Dropping.");
return 0;
}
tor_assert(conn->socks_request->command == SOCKS_COMMAND_RESOLVE ||
conn->socks_request->command == SOCKS_COMMAND_RESOLVE_PTR);
answer_len = cell->payload[RELAY_HEADER_SIZE+1];
if (rh->length < 2 || answer_len+2>rh->length) {
- log_warn(LD_PROTOCOL, "Dropping malformed 'resolved' cell");
+ log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
+ "Dropping malformed 'resolved' cell");
connection_mark_unattached_ap(conn, END_STREAM_REASON_TORPROTOCOL);
return 0;
}
@@ -928,8 +932,8 @@
log_debug(domain, "Now seen %d relay cells here.", num_seen);
if (rh.length > RELAY_PAYLOAD_SIZE) {
- log_warn(LD_PROTOCOL,
- "Relay cell length field too long. Closing circuit.");
+ log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
+ "Relay cell length field too long. Closing circuit.");
return - END_CIRC_REASON_TORPROTOCOL;
}
@@ -948,11 +952,13 @@
case RELAY_COMMAND_BEGIN_DIR:
if (layer_hint &&
circ->purpose != CIRCUIT_PURPOSE_S_REND_JOINED) {
- log_warn(LD_APP,"relay begin request unsupported at AP. Dropping.");
+ log_fn(LOG_PROTOCOL_WARN, LD_APP,
+ "Relay begin request unsupported at AP. Dropping.");
return 0;
}
if (conn) {
- log_warn(domain,"begin cell for known stream. Dropping.");
+ log_fn(LOG_PROTOCOL_WARN, domain,
+ "Begin cell for known stream. Dropping.");
return 0;
}
connection_exit_begin_conn(cell, circ);
@@ -1016,14 +1022,15 @@
return 0;
case RELAY_COMMAND_EXTEND:
if (conn) {
- log_warn(domain,"'extend' for non-zero stream. Dropping.");
+ log_fn(LOG_PROTOCOL_WARN, domain,
+ "'extend' cell received for non-zero stream. Dropping.");
return 0;
}
return circuit_extend(cell, circ);
case RELAY_COMMAND_EXTENDED:
if (!layer_hint) {
- log_warn(LD_PROTOCOL,
- "'extended' unsupported at non-origin. Dropping.");
+ log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
+ "'extended' unsupported at non-origin. Dropping.");
return 0;
}
log_debug(domain,"Got an extended cell! Yay.");
@@ -1040,7 +1047,8 @@
return 0;
case RELAY_COMMAND_TRUNCATE:
if (layer_hint) {
- log_warn(LD_APP,"'truncate' unsupported at origin. Dropping.");
+ log_fn(LOG_PROTOCOL_WARN, LD_APP,
+ "'truncate' unsupported at origin. Dropping.");
return 0;
}
if (circ->n_conn) {
@@ -1058,7 +1066,8 @@
return 0;
case RELAY_COMMAND_TRUNCATED:
if (!layer_hint) {
- log_warn(LD_EXIT,"'truncated' unsupported at non-origin. Dropping.");
+ log_fn(LOG_PROTOCOL_WARN, LD_EXIT,
+ "'truncated' unsupported at non-origin. Dropping.");
return 0;
}
circuit_truncated(TO_ORIGIN_CIRCUIT(circ), layer_hint);
@@ -1101,21 +1110,25 @@
return 0;
case RELAY_COMMAND_RESOLVE:
if (layer_hint) {
- log_warn(LD_APP,"resolve request unsupported at AP; dropping.");
+ log_fn(LOG_PROTOCOL_WARN, LD_APP,
+ "resolve request unsupported at AP; dropping.");
return 0;
} else if (conn) {
- log_warn(domain, "resolve request for known stream; dropping.");
+ log_fn(LOG_PROTOCOL_WARN, domain,
+ "resolve request for known stream; dropping.");
return 0;
} else if (circ->purpose != CIRCUIT_PURPOSE_OR) {
- log_warn(domain, "resolve request on circ with purpose %d; dropping",
- circ->purpose);
+ log_fn(LOG_PROTOCOL_WARN, domain,
+ "resolve request on circ with purpose %d; dropping",
+ circ->purpose);
return 0;
}
connection_exit_begin_resolve(cell, TO_OR_CIRCUIT(circ));
return 0;
case RELAY_COMMAND_RESOLVED:
if (conn) {
- log_warn(domain,"'resolved' unsupported while open. Closing circ.");
+ log_fn(LOG_PROTOCOL_WARN, domain,
+ "'resolved' unsupported while open. Closing circ.");
return -END_CIRC_REASON_TORPROTOCOL;
}
log_info(domain,