aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-12-15 17:26:09 -0500
committerNick Mathewson <nickm@torproject.org>2009-12-15 17:26:09 -0500
commit350181529e39c5b9dcec7f1ae7edf15946fee501 (patch)
treee6d9f2c537db3f03c0a3d9791b178dae5f1b7782 /src/or/connection.c
parent616cbb31c72a95408d018fd937f1bf3adf886a9f (diff)
parentfcbd65b45cbf203b00e6752dabc7bc5b8dffdbcf (diff)
downloadtor-350181529e39c5b9dcec7f1ae7edf15946fee501.tar.gz
tor-350181529e39c5b9dcec7f1ae7edf15946fee501.zip
Merge branch 'safelogging2'
Conflicts: ChangeLog
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 0ff1cc5876..fdbe86741f 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1261,7 +1261,8 @@ connection_connect(connection_t *conn, const char *address,
dest_addr_len = tor_addr_to_sockaddr(addr, port, dest_addr, sizeof(addrbuf));
tor_assert(dest_addr_len > 0);
- log_debug(LD_NET,"Connecting to %s:%u.",escaped_safe_str(address),port);
+ log_debug(LD_NET, "Connecting to %s:%u.",
+ escaped_safe_str_client(address), port);
if (connect(s, dest_addr, dest_addr_len) < 0) {
int e = tor_socket_errno(s);
@@ -1269,7 +1270,8 @@ connection_connect(connection_t *conn, const char *address,
/* yuck. kill it. */
*socket_error = e;
log_info(LD_NET,
- "connect() to %s:%u failed: %s",escaped_safe_str(address),
+ "connect() to %s:%u failed: %s",
+ escaped_safe_str_client(address),
port, tor_socket_strerror(e));
tor_close_socket(s);
return -1;
@@ -1283,7 +1285,8 @@ connection_connect(connection_t *conn, const char *address,
/* it succeeded. we're connected. */
log_fn(inprogress?LOG_DEBUG:LOG_INFO, LD_NET,
- "Connection to %s:%u %s (sock %d).",escaped_safe_str(address),
+ "Connection to %s:%u %s (sock %d).",
+ escaped_safe_str_client(address),
port, inprogress?"in progress":"established", s);
conn->s = s;
if (connection_add(conn) < 0) /* no space, forget it */