aboutsummaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-event.c
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2017-10-24 22:17:59 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-13 15:02:54 +0100
commit67d50c819ea60b00a3441d446ce6719ec3bf2349 (patch)
tree158e6d4920cd460ccafbdaa1cee97738242daec6 /ctl-lib/ctl-event.c
parent2b77a50d5c578d92ac692b872f5a51c227c29334 (diff)
First working version as submodule
Diffstat (limited to 'ctl-lib/ctl-event.c')
-rw-r--r--ctl-lib/ctl-event.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ctl-lib/ctl-event.c b/ctl-lib/ctl-event.c
index b9be1c7..62632e6 100644
--- a/ctl-lib/ctl-event.c
+++ b/ctl-lib/ctl-event.c
@@ -35,13 +35,13 @@ PUBLIC void CtrlDispatchApiEvent (AFB_ApiT apiHandle, const char *evtLabel, stru
int index= ActionLabelToIndex(actions, evtLabel);
if (index < 0) {
- AFB_ApiWarning(apiHandle, "CtlDispatchEvent: fail to find label=%s in action event section", evtLabel);
+ AFB_ApiWarning(apiHandle, "CtlDispatchEvent: fail to find uid=%s in action event section", evtLabel);
return;
}
// create a dummy source for action
CtlSourceT source;
- source.label = actions[index].label;
+ source.uid = actions[index].uid;
source.api = actions[index].api;
source.request = NULL;
@@ -59,12 +59,12 @@ PUBLIC void CtrlDispatchV2Event(const char *evtLabel, json_object *eventJ) {
int index= ActionLabelToIndex(actions, evtLabel);
if (index < 0) {
- AFB_WARNING ("CtlDispatchEvent: fail to find label=%s in action event section", evtLabel);
+ AFB_WARNING ("CtlDispatchEvent: fail to find uid=%s in action event section", evtLabel);
return;
}
CtlSourceT source;
- source.label = actions[index].label;
+ source.uid = actions[index].uid;
source.api = actions[index].api;
source.request = AFB_ReqNone;
@@ -78,7 +78,7 @@ PUBLIC int EventConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *ac
// Load time parse actions in config file
if (actionsJ != NULL) {
- section->actions= ActionConfig(apiHandle, actionsJ, 1);
+ section->actions= ActionConfig(apiHandle, actionsJ, 0);
if (!section->actions) {
AFB_ApiError (apiHandle, "EventLoad config fail processing onload actions");