[or-cvs] r8403: actually, do the bandwidth test anyway, if you've been up at (tor/trunk/src/or)
arma at seul.org
arma at seul.org
Fri Sep 15 18:07:11 UTC 2006
Author: arma
Date: 2006-09-15 14:07:11 -0400 (Fri, 15 Sep 2006)
New Revision: 8403
Modified:
tor/trunk/src/or/router.c
Log:
actually, do the bandwidth test anyway, if you've been up at
least 6 hours at your previous address.
Modified: tor/trunk/src/or/router.c
===================================================================
--- tor/trunk/src/or/router.c 2006-09-15 18:03:53 UTC (rev 8402)
+++ tor/trunk/src/or/router.c 2006-09-15 18:07:11 UTC (rev 8403)
@@ -483,14 +483,17 @@
}
}
+#define UPTIME_CUTOFF_FOR_NEW_BANDWIDTH_TEST (6*60*60)
+
/** Our router has just moved to a new IP. Reset stats. */
void
server_has_changed_ip(void)
{
+ if (stats_n_seconds_working > UPTIME_CUTOFF_FOR_NEW_BANDWIDTH_TEST)
+ reset_bandwidth_test();
stats_n_seconds_working = 0;
can_reach_or_port = 0;
can_reach_dir_port = 0;
-// reset_bandwidth_test();
mark_my_descriptor_dirty();
}
More information about the tor-commits
mailing list