diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-12-15 17:23:36 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-12-15 17:25:34 -0500 |
commit | fcbd65b45cbf203b00e6752dabc7bc5b8dffdbcf (patch) | |
tree | 5c27f43119bad03fc2465af47105f801bbe3dc26 /src/or/command.c | |
parent | a8190b09a319bf6b1bac7608ea77f828f9970056 (diff) | |
download | tor-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/command.c')
-rw-r--r-- | src/or/command.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/command.c b/src/or/command.c index 2e8c97f1f5..b1e6fa23a3 100644 --- a/src/or/command.c +++ b/src/or/command.c @@ -405,7 +405,7 @@ command_process_relay_cell(cell_t *cell, or_connection_t *conn) log_fn(LOG_PROTOCOL_WARN, LD_OR, "Received too many RELAY_EARLY cells on circ %d from %s:%d." " Closing circuit.", - cell->circ_id, safe_str_relay(conn->_base.address), + cell->circ_id, safe_str(conn->_base.address), conn->_base.port); circuit_mark_for_close(circ, END_CIRC_REASON_TORPROTOCOL); return; @@ -515,7 +515,7 @@ command_process_versions_cell(var_cell_t *cell, or_connection_t *conn) log_info(LD_OR, "Negotiated version %d with %s:%d; sending NETINFO.", highest_supported_version, - safe_str(conn->_base.address), + safe_str_client(conn->_base.address), conn->_base.port); tor_assert(conn->link_proto >= 2); @@ -629,7 +629,7 @@ command_process_netinfo_cell(cell_t *cell, or_connection_t *conn) else log_info(LD_OR, "Got good NETINFO cell from %s:%d; OR connection is now " "open, using protocol version %d", - safe_str(conn->_base.address), + safe_str_client(conn->_base.address), conn->_base.port, (int)conn->link_proto); assert_connection_ok(TO_CONN(conn),time(NULL)); } |