[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r8403: actually, do the bandwidth test anyway, if you've been up at (tor/trunk/src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r8403: actually, do the bandwidth test anyway, if you've been up at (tor/trunk/src/or)
- From: arma@xxxxxxxx
- Date: Fri, 15 Sep 2006 14:07:11 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Fri, 15 Sep 2006 14:07:18 -0400
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
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();
}