From 729002ef82202c30b14d8137c6763a5fefc1a4b4 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Tue, 8 Nov 2022 21:32:07 +0100 Subject: [PATCH] Fix regression introduced in d810ac0: drop 'return;' statement The condition subsystem starts very late, this should not affect running callbacks in plugins. In d810ac0 an extra return statement was included in a new if() statement block that run plugins hooks. This caused a massive regression in how Finit starts up and runs. - drop return; statement that causes regression - move #ifdefs to surround if() statement Signed-off-by: Joachim Wiberg --- src/plugin.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/plugin.c b/src/plugin.c index 46c66bb2..23541ea3 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -221,13 +221,12 @@ void plugin_run_hook(hook_point_t no, void *arg) { plugin_t *p, *tmp; - if (!cond_is_available()) { #ifdef HAVE_HOOK_SCRIPTS_PLUGIN - warnx("conditions not available, calling script script based hooks only!"); + if (!cond_is_available()) { + dbg("conditions not available, calling script script based hooks only!"); plugin_script_run(no); -#endif - return; } +#endif PLUGIN_ITERATOR(p, tmp) { if (p->hook[no].cb) {