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 <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2022-11-08 21:32:07 +01:00
parent 58b075dbf2
commit 729002ef82
+3 -4
View File
@@ -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) {