From fc2e5bc18026460bddcfd84c74e880193079a5c9 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Sun, 6 May 2018 14:27:05 +0200 Subject: Fix: callback execution condition Test the wrong pointer to know if there is a CB to execute. Action pointer could be void as the loading callback isn't stored in it. Change-Id: I3281cdd603cc8b90059331fcff694b354eae1db0 Signed-off-by: Romain Forlot --- ctl-lib/ctl-config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ctl-lib') diff --git a/ctl-lib/ctl-config.c b/ctl-lib/ctl-config.c index 09ccf4a..6294f63 100644 --- a/ctl-lib/ctl-config.c +++ b/ctl-lib/ctl-config.c @@ -118,7 +118,7 @@ PUBLIC int CtlConfigExec(AFB_ApiT apiHandle, CtlConfigT *ctlConfig) { int errcount=0; for (int idx = 0; ctlConfig->sections[idx].key != NULL; idx++) { - if (!ctlConfig->sections[idx].actions) + if (!ctlConfig->sections[idx].loadCB) AFB_ApiNotice(apiHandle, "CtlConfigLoad: notice empty section '%s'", ctlConfig->sections[idx].key); else errcount += ctlConfig->sections[idx].loadCB(apiHandle, &ctlConfig->sections[idx], NULL); -- cgit 1.2.3-korg