[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] if somebody starts his tor server in jan 2004 and then fixe...
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] if somebody starts his tor server in jan 2004 and then fixe...
- From: arma@xxxxxxxx (Roger Dingledine)
- Date: Tue, 11 Jan 2005 06:54:13 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Tue, 11 Jan 2005 06:54:39 -0500
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or
Modified Files:
main.c
Log Message:
if somebody starts his tor server in jan 2004 and then fixes his
clock, don't make his published uptime be a year.
Index: main.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.419
retrieving revision 1.420
diff -u -d -r1.419 -r1.420
--- main.c 10 Jan 2005 05:10:22 -0000 1.419
+++ main.c 11 Jan 2005 11:54:11 -0000 1.420
@@ -765,7 +765,9 @@
stats_prev_global_read_bucket = global_read_bucket;
stats_prev_global_write_bucket = global_write_bucket;
- stats_n_seconds_working += seconds_elapsed;
+ /* if more than 10s have elapsed, probably the clock changed: doesn't count. */
+ if (seconds_elapsed < 10)
+ stats_n_seconds_working += seconds_elapsed;
assert_all_pending_dns_resolves_ok();
run_scheduled_events(now.tv_sec);