summaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-event.c
diff options
context:
space:
mode:
Diffstat (limited to 'ctl-lib/ctl-event.c')
-rw-r--r--ctl-lib/ctl-event.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/ctl-lib/ctl-event.c b/ctl-lib/ctl-event.c
index 4174000..1bed333 100644
--- a/ctl-lib/ctl-event.c
+++ b/ctl-lib/ctl-event.c
@@ -86,16 +86,14 @@ void CtrlDispatchV2Event(const char *evtLabel, json_object *eventJ) {
// onload section receive one action or an array of actions
int EventConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *actionsJ) {
-
+ int err = 0;
// Load time parse actions in config file
if (actionsJ != NULL) {
- section->actions= ActionConfig(apiHandle, actionsJ, 0);
-
- if (!section->actions) {
- AFB_ApiError (apiHandle, "EventLoad config fail processing onload actions");
- return 1;
+ if ( (err= AddActionsToSection(apiHandle, section, actionsJ, 0)) ) {
+ AFB_ApiError (apiHandle, "EventLoad config fail processing actions for section %s", section->uid);
+ return err;
}
}
- return 0;
+ return err;
}