aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-09-28 13:19:55 -0400
committerNick Mathewson <nickm@torproject.org>2011-10-10 23:14:30 -0400
commitce102f7a59eb286b18d5f7522467aa152bff7e82 (patch)
treecebeda412a3b3a7b26ce6396abac4a88f1641080
parent23664fb3b8461bfdbfab403371e90b4af1b42450 (diff)
downloadtor-ce102f7a59eb286b18d5f7522467aa152bff7e82.tar
tor-ce102f7a59eb286b18d5f7522467aa152bff7e82.tar.gz
Make more safe_str usage happen for new logs in command.c
-rw-r--r--src/or/command.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/or/command.c b/src/or/command.c
index ca248e66b..91486c14b 100644
--- a/src/or/command.c
+++ b/src/or/command.c
@@ -859,7 +859,7 @@ command_process_cert_cell(var_cell_t *cell, or_connection_t *conn)
do { \
log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL, \
"Received a bad CERT cell from %s:%d: %s", \
- conn->_base.address, conn->_base.port, (s)); \
+ safe_str(conn->_base.address), conn->_base.port, (s)); \
connection_mark_for_close(TO_CONN(conn)); \
goto err; \
} while (0)
@@ -906,7 +906,7 @@ command_process_cert_cell(var_cell_t *cell, or_connection_t *conn)
if (!cert) {
log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
"Received undecodable certificate in CERT cell from %s:%d",
- conn->_base.address, conn->_base.port);
+ safe_str(conn->_base.address), conn->_base.port);
} else {
if (cert_type == OR_CERT_TYPE_TLS_LINK && !link_cert)
link_cert = cert;
@@ -952,7 +952,7 @@ command_process_cert_cell(var_cell_t *cell, or_connection_t *conn)
ERR("Problem setting or checking peer id");
log_info(LD_OR, "Got some good certifcates from %s:%d: Authenticated it.",
- conn->_base.address, conn->_base.port);
+ safe_str(conn->_base.address), conn->_base.port);
conn->handshake_state->id_cert = id_cert;
id_cert = NULL;
@@ -971,7 +971,7 @@ command_process_cert_cell(var_cell_t *cell, or_connection_t *conn)
log_info(LD_OR, "Got some good certifcates from %s:%d: "
"Waiting for AUTHENTICATE.",
- conn->_base.address, conn->_base.port);
+ safe_str(conn->_base.address), conn->_base.port);
/* XXXX check more stuff? */
id_cert = auth_cert = NULL;
@@ -1002,7 +1002,7 @@ command_process_auth_challenge_cell(var_cell_t *cell, or_connection_t *conn)
do { \
log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL, \
"Received a bad AUTH_CHALLENGE cell from %s:%d: %s", \
- conn->_base.address, conn->_base.port, (s)); \
+ safe_str(conn->_base.address), conn->_base.port, (s)); \
connection_mark_for_close(TO_CONN(conn)); \
return; \
} while (0)
@@ -1042,7 +1042,7 @@ command_process_auth_challenge_cell(var_cell_t *cell, or_connection_t *conn)
if (use_type && public_server_mode(get_options())) {
log_info(LD_OR, "Got an AUTH_CHALLENGE cell from %s:%d: Sending "
"authentication",
- conn->_base.address, conn->_base.port);
+ safe_str(conn->_base.address), conn->_base.port);
if (connection_or_send_authenticate_cell(conn, use_type) < 0) {
log_warn(LD_OR, "Couldn't send authenticate cell");
@@ -1056,7 +1056,7 @@ command_process_auth_challenge_cell(var_cell_t *cell, or_connection_t *conn)
}
} else {
log_info(LD_OR, "Got an AUTH_CHALLENGE cell from %s:%d: Not authenticating",
- conn->_base.address, conn->_base.port);
+ safe_str(conn->_base.address), conn->_base.port);
}
#undef ERR
}
@@ -1080,7 +1080,7 @@ command_process_authenticate_cell(var_cell_t *cell, or_connection_t *conn)
do { \
log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL, \
"Received a bad AUTHETNICATE cell from %s:%d: %s", \
- conn->_base.address, conn->_base.port, (s)); \
+ safe_str(conn->_base.address), conn->_base.port, (s)); \
connection_mark_for_close(TO_CONN(conn)); \
return; \
} while (0)
@@ -1185,7 +1185,7 @@ command_process_authenticate_cell(var_cell_t *cell, or_connection_t *conn)
0);
log_info(LD_OR, "Got an AUTHENTICATE cell from %s:%d: Looks good.",
- conn->_base.address, conn->_base.port);
+ safe_str(conn->_base.address), conn->_base.port);
}
#undef ERR