diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-04-26 13:17:35 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-04-30 11:14:59 -0400 |
commit | b7cc631d2391d55c078e0693303f6a0d4d9e963a (patch) | |
tree | 0c50ef90b58c72d89d5eff40e0f9384cc73f74b8 /src/test/test_periodic_event.c | |
parent | 9a62a820fb2b0319c27d5f5131c2227a66133ee0 (diff) | |
download | tor-b7cc631d2391d55c078e0693303f6a0d4d9e963a.tar.gz tor-b7cc631d2391d55c078e0693303f6a0d4d9e963a.zip |
Rename and clarify some functions for periodic events
When we tell the periodic event manager about an event, we are
"registering" that event. The event sits around without being
usable, however, until we "connect" the event to libevent. In the
end, we "disconnect" the event and remove its libevent parts.
Previously, we called these operations "add", "setup", and
"destroy", which led to confusion.
Diffstat (limited to 'src/test/test_periodic_event.c')
-rw-r--r-- | src/test/test_periodic_event.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test_periodic_event.c b/src/test/test_periodic_event.c index 19325ed3b7..961a8be698 100644 --- a/src/test/test_periodic_event.c +++ b/src/test/test_periodic_event.c @@ -51,7 +51,7 @@ test_pe_initialize(void *arg) * need to run the main loop and then wait for a second delaying the unit * tests. Instead, we'll test the callback work indepedently elsewhere. */ initialize_periodic_events(); - periodic_events_setup_all(); + periodic_events_connect_all(); set_network_participation(false); rescan_periodic_events(get_options()); @@ -111,7 +111,7 @@ test_pe_launch(void *arg) #endif initialize_periodic_events(); - periodic_events_setup_all(); + periodic_events_connect_all(); /* Now that we've initialized, rescan the list to launch. */ periodic_events_on_new_options(options); @@ -302,7 +302,7 @@ test_pe_hs_service(void *arg) consider_hibernation(time(NULL)); /* Initialize the events so we can enable them */ initialize_periodic_events(); - periodic_events_setup_all(); + periodic_events_connect_all(); /* Hack: We'll set a dumb fn() of each events so they don't get called when * dispatching them. We just want to test the state of the callbacks, not |