[tor-commits] [tor/master] Mark libevent unitialized on shutdown.
nickm at torproject.org
nickm at torproject.org
Thu Jan 11 18:00:44 UTC 2018
commit 474ca13d6a5e8aa2cf099e92e68eb932b15b2315
Author: Nick Mathewson <nickm at torproject.org>
Date: Mon Dec 11 11:37:20 2017 -0500
Mark libevent unitialized on shutdown.
This is necessary so that we will reinitialize it on startup.
---
src/or/config.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/or/config.c b/src/or/config.c
index 23184af31..e7d11df07 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -796,6 +796,8 @@ static smartlist_t *configured_ports = NULL;
/** True iff we're currently validating options, and any calls to
* get_options() are likely to be bugs. */
static int in_option_validation = 0;
+/* True iff we've initialized libevent */
+static int libevent_initialized = 0;
/** Return the contents of our frontpage string, or NULL if not configured. */
MOCK_IMPL(const char*,
@@ -986,6 +988,7 @@ config_free_all(void)
tor_free(the_tor_version);
have_parsed_cmdline = 0;
+ libevent_initialized = 0;
}
/** Make <b>address</b> -- a piece of information related to our operation as
@@ -1336,7 +1339,6 @@ options_act_reversible(const or_options_t *old_options, char **msg)
{
smartlist_t *new_listeners = smartlist_new();
smartlist_t *replaced_listeners = smartlist_new();
- static int libevent_initialized = 0;
or_options_t *options = get_options_mutable();
int running_tor = options->command == CMD_RUN_TOR;
int set_conn_limit = 0;
More information about the tor-commits
mailing list