summaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-12-15 17:23:36 -0500
committerNick Mathewson <nickm@torproject.org>2009-12-15 17:25:34 -0500
commitfcbd65b45cbf203b00e6752dabc7bc5b8dffdbcf (patch)
tree5c27f43119bad03fc2465af47105f801bbe3dc26 /src/or/connection.c
parenta8190b09a319bf6b1bac7608ea77f828f9970056 (diff)
downloadtor-fcbd65b45cbf203b00e6752dabc7bc5b8dffdbcf.tar.gz
tor-fcbd65b45cbf203b00e6752dabc7bc5b8dffdbcf.zip
Refactor the safe_str_*() API to make more sense.
The new rule is: safe_str_X() means "this string is a piece of X information; make it safe to log." safe_str() on its own means "this string is a piece of who-knows-what; make it safe to log".
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 74d2bf26ab..3065e43c78 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1263,7 +1263,7 @@ connection_connect(connection_t *conn, const char *address,
tor_assert(dest_addr_len > 0);
log_debug(LD_NET, "Connecting to %s:%u.",
- escaped_safe_str(address), port);
+ escaped_safe_str_client(address), port);
if (connect(s, dest_addr, dest_addr_len) < 0) {
int e = tor_socket_errno(s);
@@ -1272,7 +1272,7 @@ connection_connect(connection_t *conn, const char *address,
*socket_error = e;
log_info(LD_NET,
"connect() to %s:%u failed: %s",
- escaped_safe_str(address),
+ escaped_safe_str_client(address),
port, tor_socket_strerror(e));
tor_close_socket(s);
return -1;
@@ -1287,7 +1287,7 @@ 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),
+ escaped_safe_str_client(address),
port, inprogress?"in progress":"established", s);
conn->s = s;
if (connection_add(conn) < 0) /* no space, forget it */