diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-12-26 11:07:15 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-12-26 11:07:15 -0500 |
commit | a7334f5122046b55a5eff425cdaaa3e56c5defed (patch) | |
tree | 22fc6bbfb9eafbff43f285963b4edf81ec969603 /src/or/connection.c | |
parent | f269e0f9a51ecc7f22e62bde302afd8574d2f96f (diff) | |
download | tor-a7334f5122046b55a5eff425cdaaa3e56c5defed.tar.gz tor-a7334f5122046b55a5eff425cdaaa3e56c5defed.zip |
Use log_fn_ratelim in a few places.
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 740462e7c6..5da4d39ba5 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -1441,16 +1441,13 @@ connection_connect(connection_t *conn, const char *address, /* We should never even try to connect anyplace if DisableNetwork is set. * Warn if we do, and refuse to make the connection. */ static ratelim_t disablenet_violated = RATELIM_INIT(30*60); - char *m; #ifdef _WIN32 *socket_error = WSAENETUNREACH; #else *socket_error = ENETUNREACH; #endif - if ((m = rate_limit_log(&disablenet_violated, approx_time()))) { - log_warn(LD_BUG, "Tried to open a socket with DisableNetwork set.%s", m); - tor_free(m); - } + log_fn_ratelim(&disablenet_violated, LOG_WARN, LD_BUG, + "Tried to open a socket with DisableNetwork set."); tor_fragile_assert(); return -1; } |