--- /dev/null
+ o Major bugfixes (initialization, crash):
+ - Fix an assertion crash that would stop Tor from starting up if
+ the code tried to activate a periodic event too early. Fixes bug
+ 27861; bugfix on 0.3.5.1-alpha.
STATIC void
initialize_periodic_events(void)
{
- tor_assert(periodic_events_initialized == 0);
+ if (periodic_events_initialized)
+ return;
+
periodic_events_initialized = 1;
/* Set up all periodic events. We'll launch them by roles. */
void
initialize_mainloop_events(void)
{
+ initialize_periodic_events();
+
if (!schedule_active_linked_connections_event) {
schedule_active_linked_connections_event =
mainloop_event_postloop_new(schedule_active_linked_connections_cb, NULL);
/* initialize the periodic events first, so that code that depends on the
* events being present does not assert.
*/
- if (! periodic_events_initialized) {
- initialize_periodic_events();
- }
-
+ initialize_periodic_events();
initialize_mainloop_events();
/* set up once-a-second callback. */
item->fn = dumb_event_fn;
}
- /* Lets make sure that before intialization, we can't scan the periodic
- * events list and launch them. Lets try by being a Client. */
options = get_options_mutable();
options->SocksPort_set = 1;
periodic_events_on_new_options(options);
+#if 0
+ /* Lets make sure that before intialization, we can't scan the periodic
+ * events list and launch them. Lets try by being a Client. */
+ /* XXXX We make sure these events are initialized now way earlier than we
+ * did before. */
for (int i = 0; periodic_events[i].name; ++i) {
periodic_event_item_t *item = &periodic_events[i];
tt_int_op(periodic_event_is_enabled(item), OP_EQ, 0);
}
+#endif
initialize_periodic_events();