aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_periodic_event.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-27 12:44:20 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-27 13:24:36 -0400
commitd0b2b5a20269c050d5346a869940b55ff2add190 (patch)
tree2b7b99397499e06e85758e2c1ab7d4264ea3991f /src/test/test_periodic_event.c
parentde0b07c634c45297bad794567cb44ab91988b0ca (diff)
downloadtor-d0b2b5a20269c050d5346a869940b55ff2add190.tar.gz
tor-d0b2b5a20269c050d5346a869940b55ff2add190.zip
Always initialize the periodic events list.
Various places in our code try to activate these events or check their status, so we should make sure they're initialized as early as possible. Fixes bug 27861; bugfix on 0.3.5.1-alpha.
Diffstat (limited to 'src/test/test_periodic_event.c')
-rw-r--r--src/test/test_periodic_event.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/test_periodic_event.c b/src/test/test_periodic_event.c
index 7804a9d8fb..86dedd85d8 100644
--- a/src/test/test_periodic_event.c
+++ b/src/test/test_periodic_event.c
@@ -87,15 +87,19 @@ test_pe_launch(void *arg)
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();