aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2013-08-25 08:45:07 -0700
committerAndrea Shepard <andrea@torproject.org>2014-09-30 22:48:24 -0700
commitd438cf1ec9d5de08b8a8fffd7c38b66134fd337c (patch)
tree0ce78e25fde753880ff5bf092c1599d982d0c8a5 /src/or/main.c
parent1987157d0c1e9acb0b88156e7104fbc8a11c5932 (diff)
downloadtor-d438cf1ec9d5de08b8a8fffd7c38b66134fd337c.tar.gz
tor-d438cf1ec9d5de08b8a8fffd7c38b66134fd337c.zip
Implement scheduler mechanism to track lists of channels wanting cells or writes; doesn't actually drive the cell flow from it yet
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 094120fecf..1a2cfad255 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -52,6 +52,7 @@
#include "router.h"
#include "routerlist.h"
#include "routerparse.h"
+#include "scheduler.h"
#include "statefile.h"
#include "status.h"
#include "util_process.h"
@@ -2455,6 +2456,14 @@ tor_init(int argc, char *argv[])
log_warn(LD_NET, "Problem initializing libevent RNG.");
}
+ /*
+ * Initialize the scheduler - this has to come after
+ * options_init_from_torrc() sets up libevent - why yes, that seems
+ * completely sensible to hide the libevent setup in the option parsing
+ * code!
+ */
+ scheduler_init();
+
return 0;
}
@@ -2552,6 +2561,7 @@ tor_free_all(int postfork)
channel_tls_free_all();
channel_free_all();
connection_free_all();
+ scheduler_free_all();
buf_shrink_freelists(1);
memarea_clear_freelist();
nodelist_free_all();