From 03896be378f2295290f2d75cfec28f5b9b430136 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 16 Feb 2020 14:23:24 +0000 Subject: [PATCH] site: Change site->control(bool_t) to site->startup() This is only ever called with run=True. We are going to want to rely on this property. If we ever do more runtime reconfig that will be done differently. Signed-off-by: Ian Jackson --- secnet.c | 2 +- secnet.h | 4 ++-- site.c | 7 +++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/secnet.c b/secnet.c index de16eb3..a00124f 100644 --- a/secnet.c +++ b/secnet.c @@ -247,7 +247,7 @@ static void start_sites(dict_t *config) { cfgfatal(site->loc,"system","non-site closure in site list"); } s=site->data.closure->interface; - s->control(s->st,True); + s->startup(s->st); } } } diff --git a/secnet.h b/secnet.h index d447ffb..fd4b48f 100644 --- a/secnet.h +++ b/secnet.h @@ -659,11 +659,11 @@ void log_early_init(void); /* Pretty much a placeholder; allows starting and stopping of processing, key expiry, etc. */ -typedef void site_control_fn(void *st, bool_t run); +typedef void site_startup_fn(void *st); typedef uint32_t site_status_fn(void *st); struct site_if { void *st; - site_control_fn *control; + site_startup_fn *startup; site_status_fn *status; }; diff --git a/site.c b/site.c index 317bdc5..a071500 100644 --- a/site.c +++ b/site.c @@ -2283,11 +2283,10 @@ static bool_t site_incoming(void *sst, struct buffer_if *buf, return False; } -static void site_control(void *vst, bool_t run) +static void site_startup(void *vst) { struct site *st=vst; - if (run) enter_state_run(st); - else enter_state_stop(st); + enter_state_run(st); } static void site_phase_hook(void *sst, uint32_t newphase) @@ -2331,7 +2330,7 @@ static list_t *site_apply(closure_t *self, struct cloc loc, dict_t *context, st->cl.apply=NULL; st->cl.interface=&st->ops; st->ops.st=st; - st->ops.control=site_control; + st->ops.startup=site_startup; st->ops.status=site_status; st->peerkeys_path=0; st->peerkeys_tmpl.buffer=0; -- 2.30.2