aboutsummaryrefslogtreecommitdiffstats
path: root/ctl-lib
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-05-06 14:27:05 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-13 15:02:54 +0100
commitfc2e5bc18026460bddcfd84c74e880193079a5c9 (patch)
treefef9a636ba4b165a3fd56aacece9b9e33f2842f7 /ctl-lib
parente8b0b19bba131922ebd1beb4ec0dd5e1c27863ae (diff)
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 <romain.forlot@iot.bzh>
Diffstat (limited to 'ctl-lib')
-rw-r--r--ctl-lib/ctl-config.c2
1 files changed, 1 insertions, 1 deletions
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);