[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] reset published uptime when you wake up from hibernation,
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] reset published uptime when you wake up from hibernation,
- From: arma@xxxxxxxx (Roger Dingledine)
- Date: Fri, 14 Jan 2005 12:49:28 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Fri, 14 Jan 2005 12:49:55 -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:
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. */