diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2018-05-06 14:27:05 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-05-09 15:03:13 +0200 |
commit | 59bbc828469169b518eea036f63f60b5ac8f6264 (patch) | |
tree | fef9a636ba4b165a3fd56aacece9b9e33f2842f7 /ctl-lib | |
parent | f6113f29c57fd0c7b4df8e1fa6e5514720056320 (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.c | 2 |
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); |