aboutsummaryrefslogtreecommitdiff
path: root/src/or/hibernate.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-11-02 23:47:32 +0000
committerNick Mathewson <nickm@torproject.org>2004-11-02 23:47:32 +0000
commit8db0abb687a379906828ac252b7da3c0cd7b20c1 (patch)
treecaeca53c34e54db6dc7c374e9c0669cc88bfa178 /src/or/hibernate.c
parenta2f6210b3e1a7ff261855981fc06031f78cba8f4 (diff)
downloadtor-8db0abb687a379906828ac252b7da3c0cd7b20c1.tar.gz
tor-8db0abb687a379906828ac252b7da3c0cd7b20c1.zip
First attempt at hibernation code. It needs more work around the XXXXs, but first I want arma to review the basic approach while I meditate on how to fix them.
svn:r2649
Diffstat (limited to 'src/or/hibernate.c')
-rw-r--r--src/or/hibernate.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/or/hibernate.c b/src/or/hibernate.c
index 30fff57f98..684734229a 100644
--- a/src/or/hibernate.c
+++ b/src/or/hibernate.c
@@ -33,23 +33,17 @@ time_t hibernate_timeout = 0;
/** Returns 1 if the bandwidth soft limit has been reached, else 0. */
static int hibernate_soft_limit_reached(void) {
-
-
- return 0;
+ return accounting_soft_limit_reached();
}
/** Returns 1 if the bandwidth hard limit has been reached, else 0. */
static int hibernate_hard_limit_reached(void) {
-
-
- return 0;
+ return accounting_hard_limit_reached();
}
/** Return the time when we should stop being dormant. */
static time_t hibernate_calc_wakeup_time(void) {
-
-
- return 0;
+ return accounting_get_wakeup_time();
}
/** Called when we get a SIGINT, or when bandwidth soft limit