aboutsummaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-action.c
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-05-16 01:25:19 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-05-18 13:52:47 +0000
commitd02408c2d2d8b26c5eaf97186674abee95f1f490 (patch)
treee0a9df00694420c457c4aed767f1a7d4421702a9 /ctl-lib/ctl-action.c
parentfd225ddf14937669a9d7cb38fcfac7463224d514 (diff)
Detect failure at OnLoad action calls
Be able to detect that an action has failed on an Onload section processing to avoid retrieving a wrong context after that. Change-Id: If694b11eb0a37154b539c421e43bebdb15d498c0 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'ctl-lib/ctl-action.c')
-rw-r--r--ctl-lib/ctl-action.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ctl-lib/ctl-action.c b/ctl-lib/ctl-action.c
index 583ed5c..e1329e2 100644
--- a/ctl-lib/ctl-action.c
+++ b/ctl-lib/ctl-action.c
@@ -51,7 +51,7 @@ void ActionExecUID(AFB_ReqT request, CtlConfigT *ctlConfig, const char *uid, jso
}
}
-void ActionExecOne(CtlSourceT *source, CtlActionT* action, json_object *queryJ) {
+int ActionExecOne(CtlSourceT *source, CtlActionT* action, json_object *queryJ) {
int err = 0;
switch (action->type) {
@@ -114,6 +114,7 @@ void ActionExecOne(CtlSourceT *source, CtlActionT* action, json_object *queryJ)
}
}
json_object_put(queryJ);
+ return err;
}