[or-cvs] r16686: {tor} Oops. Make warn_too_many_conns() actually work. (tor/trunk/src/or)

nickm at seul.org nickm at seul.org
Fri Aug 29 17:01:15 UTC 2008


Author: nickm
Date: 2008-08-29 13:01:15 -0400 (Fri, 29 Aug 2008)
New Revision: 16686

Modified:
   tor/trunk/src/or/connection.c
   tor/trunk/src/or/geoip.c
Log:
Oops.  Make warn_too_many_conns() actually work.  

Modified: tor/trunk/src/or/connection.c
===================================================================
--- tor/trunk/src/or/connection.c	2008-08-29 16:30:02 UTC (rev 16685)
+++ tor/trunk/src/or/connection.c	2008-08-29 17:01:15 UTC (rev 16686)
@@ -760,7 +760,8 @@
 warn_too_many_conns(void)
 {
 #define WARN_TOO_MANY_CONNS_INTERVAL (6*60*60)
-  time_t last_warned = 0, now = time(NULL);
+  static time_t last_warned = 0;
+  time_t now = time(NULL);
   int n_conns = get_n_open_sockets();
   if (last_warned + WARN_TOO_MANY_CONNS_INTERVAL < now) {
     log_warn(LD_NET,"Failing because we have %d connections already. Please "

Modified: tor/trunk/src/or/geoip.c
===================================================================
--- tor/trunk/src/or/geoip.c	2008-08-29 16:30:02 UTC (rev 16685)
+++ tor/trunk/src/or/geoip.c	2008-08-29 17:01:15 UTC (rev 16686)
@@ -406,7 +406,7 @@
 }
 
 /*DOCDOC*/
-#define GEOIP_MIN_OBSERVATION_TIME (12*60*60)
+#define GEOIP_MIN_OBSERVATION_TIME (60*60)
 
 static INLINE unsigned
 round_to_next_multiple_of(unsigned number, unsigned divisor)



More information about the tor-commits mailing list