aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/or/main.c b/src/or/main.c
index afcb313574..b63b81eb7e 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1352,12 +1352,17 @@ initialize_periodic_events_cb(evutil_socket_t fd, short events, void *data)
/** Set up all the members of periodic_events[], and configure them all to be
* launched from a callback. */
-static void
+STATIC void
initialize_periodic_events(void)
{
tor_assert(periodic_events_initialized == 0);
periodic_events_initialized = 1;
+ int i;
+ for (i = 0; periodic_events[i].name; ++i) {
+ periodic_event_setup(&periodic_events[i]);
+ }
+
#define NAMED_CALLBACK(name) \
STMT_BEGIN name ## _event = find_periodic_event( #name ); STMT_END
@@ -1372,7 +1377,7 @@ initialize_periodic_events(void)
&one_second);
}
-static void
+STATIC void
teardown_periodic_events(void)
{
int i;