From 990b434c4f4aa5e9c410bb083c1b98cead92bb59 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 7 Jun 2019 20:03:26 -0400 Subject: Make evloop into a subsystem. Note that the event base object is _not_ created from the initialize function, since it is configuration-dependent. This will wait until configuration is integrated into subsystems. Closes ticket 30806. --- src/app/main/main.c | 4 ---- src/app/main/shutdown.c | 2 -- src/app/main/subsystem_list.c | 3 +++ 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'src/app') diff --git a/src/app/main/main.c b/src/app/main/main.c index 6e325f0b10..17b0000d98 100644 --- a/src/app/main/main.c +++ b/src/app/main/main.c @@ -653,10 +653,6 @@ tor_init(int argc, char *argv[]) return -1; } - if (tor_init_libevent_rng() < 0) { - log_warn(LD_NET, "Problem initializing libevent RNG."); - } - /* Scan/clean unparseable descriptors; after reading config */ routerparse_init(); diff --git a/src/app/main/shutdown.c b/src/app/main/shutdown.c index cc0091a9ab..93d6351d1b 100644 --- a/src/app/main/shutdown.c +++ b/src/app/main/shutdown.c @@ -160,8 +160,6 @@ tor_free_all(int postfork) subsystems_shutdown(); - tor_libevent_free_all(); - /* Stuff in util.c and address.c*/ if (!postfork) { esc_router_info(NULL); diff --git a/src/app/main/subsystem_list.c b/src/app/main/subsystem_list.c index f595796232..95d96f78d2 100644 --- a/src/app/main/subsystem_list.c +++ b/src/app/main/subsystem_list.c @@ -25,6 +25,7 @@ #include "lib/time/time_sys.h" #include "lib/tls/tortls_sys.h" #include "lib/wallclock/wallclock_sys.h" +#include "lib/evloop/evloop_sys.h" #include "feature/dirauth/dirauth_sys.h" @@ -50,6 +51,8 @@ const subsys_fns_t *tor_subsystems[] = { &sys_ocirc_event, /* -32 */ &sys_btrack, /* -30 */ + &sys_evloop, /* -20 */ + &sys_mainloop, /* 5 */ &sys_or, /* 20 */ -- cgit v1.2.3-54-g00ecf