diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-27 12:44:20 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-27 13:24:36 -0400 |
commit | d0b2b5a20269c050d5346a869940b55ff2add190 (patch) | |
tree | 2b7b99397499e06e85758e2c1ab7d4264ea3991f /src/test/test_periodic_event.c | |
parent | de0b07c634c45297bad794567cb44ab91988b0ca (diff) | |
download | tor-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.c | 8 |
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(); |