[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Merge remote-tracking branch 'public/easy_ratelim'



commit 3433216268a97f8c1595fd389da0e960e8074d32
Merge: e5b07ba a7334f5
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Thu Feb 7 17:13:51 2013 -0500

    Merge remote-tracking branch 'public/easy_ratelim'
    
    Conflicts:
    	src/or/connection.c

 changes/easy.ratelim |    3 ++
 src/common/log.c     |   69 +++++++++++++++++++++++++++++++++++++++----------
 src/common/torlog.h  |   15 +++++++++++
 src/common/util.h    |    9 ++++++
 src/or/buffers.c     |   11 +++-----
 src/or/circuituse.c  |   10 ++-----
 src/or/connection.c  |    7 +---
 src/or/router.c      |    9 ++----
 8 files changed, 94 insertions(+), 39 deletions(-)

diff --cc src/or/connection.c
index d0602fd,5da4d39..7b0f081
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@@ -1444,12 -1441,13 +1444,9 @@@ connection_connect(connection_t *conn, 
      /* 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
 +    *socket_error = SOCK_ERRNO(ENETUNREACH);
-     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;
    }

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits