[or-cvs] reset published uptime when you wake up from hibernation,
Roger Dingledine
arma at seul.org
Fri Jan 14 17:49:28 UTC 2005
Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or
Modified Files:
hibernate.c
Log Message:
reset published uptime when you wake up from hibernation,
since if you hibernate daily a published uptime of >1day
will be misleading.
Index: hibernate.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/hibernate.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- hibernate.c 16 Dec 2004 21:10:51 -0000 1.41
+++ hibernate.c 14 Jan 2005 17:49:25 -0000 1.42
@@ -31,6 +31,8 @@
#define SHUTDOWN_WAIT_LENGTH 30 /* seconds */
+extern long stats_n_seconds_working; /* published uptime */
+
static int hibernate_state = HIBERNATE_STATE_LIVE;
/** If are hibernating, when do we plan to wake up? Set to 0 if we
* aren't hibernating. */
@@ -693,6 +695,7 @@
hibernate_state = new_state;
hibernate_end_time = 0; /* no longer hibernating */
+ stats_n_seconds_working = 0; /* reset published uptime */
}
/** A wrapper around hibernate_begin, for when we get SIGINT. */
More information about the tor-commits
mailing list