aboutsummaryrefslogtreecommitdiff
path: root/src/or/hibernate.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-11-15 04:01:31 +0000
committerRoger Dingledine <arma@torproject.org>2004-11-15 04:01:31 +0000
commitee591be3f2743d31f1ac5c7d2de74adb773fbec9 (patch)
tree0daff29156c24e4f330d07fe9756b5e8f3c56c2a /src/or/hibernate.c
parent47993ae6fbb84c22a5811e00390c20e03bae790b (diff)
downloadtor-ee591be3f2743d31f1ac5c7d2de74adb773fbec9.tar.gz
tor-ee591be3f2743d31f1ac5c7d2de74adb773fbec9.zip
fix a bug in configuring accounting in options_act()
svn:r2881
Diffstat (limited to 'src/or/hibernate.c')
-rw-r--r--src/or/hibernate.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/hibernate.c b/src/or/hibernate.c
index 7667a8a230..f972479246 100644
--- a/src/or/hibernate.c
+++ b/src/or/hibernate.c
@@ -91,6 +91,15 @@ static void accounting_set_wakeup_time(void);
* Functions for bandwidth accounting.
* ************/
+/** If we want to manage the accounting system and potentially
+ * hibernate, return 1, else return 0.
+ */
+int accounting_is_enabled(or_options_t *options) {
+ if (options->AccountingMaxKB)
+ return 1;
+ return 0;
+}
+
/** Called from main.c to tell us that <b>seconds</b> seconds have
* passed, <b>n_read</b> bytes have been read, and <b>n_written</b>
* bytes have been written. */