aboutsummaryrefslogtreecommitdiff
path: root/src/app/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/main')
-rw-r--r--src/app/main/main.c19
-rw-r--r--src/app/main/subsystem_list.c2
2 files changed, 2 insertions, 19 deletions
diff --git a/src/app/main/main.c b/src/app/main/main.c
index 5740efb0b6..3e80725b9a 100644
--- a/src/app/main/main.c
+++ b/src/app/main/main.c
@@ -427,18 +427,6 @@ dumpstats(int severity)
rend_service_dump_stats(severity);
}
-/** Called by exit() as we shut down the process.
- */
-static void
-exit_function(void)
-{
- /* NOTE: If we ever daemonize, this gets called immediately. That's
- * okay for now, because we only use this on Windows. */
-#ifdef _WIN32
- WSACleanup();
-#endif
-}
-
#ifdef _WIN32
#define UNIX_ONLY 0
#else
@@ -632,12 +620,6 @@ tor_init(int argc, char *argv[])
rust_log_welcome_string();
#endif /* defined(HAVE_RUST) */
- if (network_init()<0) {
- log_err(LD_BUG,"Error initializing network; exiting.");
- return -1;
- }
- atexit(exit_function);
-
int init_rv = options_init_from_torrc(argc,argv);
if (init_rv < 0) {
log_err(LD_CONFIG,"Reading config failed--see warnings above.");
@@ -784,7 +766,6 @@ tor_free_all(int postfork)
routerparse_free_all();
ext_orport_free_all();
control_free_all();
- tor_free_getaddrinfo_cache();
protover_free_all();
bridges_free_all();
consdiffmgr_free_all();
diff --git a/src/app/main/subsystem_list.c b/src/app/main/subsystem_list.c
index 3d03a9a4df..cb186c14d9 100644
--- a/src/app/main/subsystem_list.c
+++ b/src/app/main/subsystem_list.c
@@ -10,6 +10,7 @@
#include "lib/err/torerr_sys.h"
#include "lib/log/log_sys.h"
+#include "lib/net/network_sys.h"
#include "lib/process/winprocess_sys.h"
#include "lib/thread/thread_sys.h"
#include "lib/wallclock/wallclock_sys.h"
@@ -25,6 +26,7 @@ const subsys_fns_t *tor_subsystems[] = {
&sys_wallclock,
&sys_threads,
&sys_logging,
+ &sys_network,
};
const unsigned n_tor_subsystems = ARRAY_LENGTH(tor_subsystems);