summaryrefslogtreecommitdiffstats
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
committerFulup Ar Foll <fulup@iot.bzh>2017-10-24 22:17:59 +0200
commitd0563706f01f9da67de39a30e6eeb324cc25652d (patch)
tree158e6d4920cd460ccafbdaa1cee97738242daec6 /ctl-lib/ctl-event.c
parent17a6011775e8c6d1536994f8b9cd4fa2f99791f7 (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");