summaryrefslogtreecommitdiffstats
path: root/controller/ctl-onload.c
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-09-12 00:29:28 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:00:25 +0100
commitd663f702c0e4fa562783504a483dce8f362d628e (patch)
treefdb656d0467a935aa6790dd9e05d3e373606a3e1 /controller/ctl-onload.c
parent75cfbf3d0206f12422091e6479c508c69445bf4a (diff)
Progression on config parsing.
Change-Id: Idd8d8987ccabef381f6d79c1d508930a2d4bae3c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'controller/ctl-onload.c')
-rw-r--r--controller/ctl-onload.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/controller/ctl-onload.c b/controller/ctl-onload.c
index 97bd109..5000542 100644
--- a/controller/ctl-onload.c
+++ b/controller/ctl-onload.c
@@ -23,19 +23,19 @@
#include "ctl-config.h"
// onload section receive one action or an array of actions
-PUBLIC int OnloadConfig(CtlSectionT *section, json_object *actionsJ) {
+int OnloadConfig(CtlSectionT *section, json_object *actionsJ) {
CtlActionT *actions;
-
+
// Load time parse actions in config file
if (actionsJ != NULL) {
actions= ActionLoad(actionsJ);
section->handle=actions;
-
+
if (!actions) {
AFB_ERROR ("OnloadLoad config fail processing onload actions");
goto OnErrorExit;
}
-
+
} else {
// Exec time process onload action now
actions=(CtlActionT*)section->handle;
@@ -46,7 +46,7 @@ PUBLIC int OnloadConfig(CtlSectionT *section, json_object *actionsJ) {
for (int idx=0; actions[idx].source.label != NULL; idx ++) {
ActionExecOne(&actions[idx], NULL);
- }
+ }
}
return 0;