summaryrefslogtreecommitdiff
path: root/src/app/main
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-06-07 20:03:26 -0400
committerGeorge Kadianakis <desnacked@riseup.net>2019-06-14 13:28:10 +0300
commit990b434c4f4aa5e9c410bb083c1b98cead92bb59 (patch)
tree6f1f23bed7c280d075d709c6b98455b47f72360b /src/app/main
parentecc5feff386890ad34378c70a20cbbdd0d338225 (diff)
downloadtor-990b434c4f4aa5e9c410bb083c1b98cead92bb59.tar.gz
tor-990b434c4f4aa5e9c410bb083c1b98cead92bb59.zip
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.
Diffstat (limited to 'src/app/main')
-rw-r--r--src/app/main/main.c4
-rw-r--r--src/app/main/shutdown.c2
-rw-r--r--src/app/main/subsystem_list.c3
3 files changed, 3 insertions, 6 deletions
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 */