aboutsummaryrefslogtreecommitdiffstats
path: root/ctl-lib
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-11-30 15:08:39 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-11-30 15:08:39 +0100
commit5a591bb47bdc9d6e2eceda127a749b8bdb92b1a7 (patch)
tree0a2d9abfebb6fe9e38e5faeba138e2ccd5711307 /ctl-lib
parenta3af52514681cbe17819f0638911bd60c1aeb6e4 (diff)
Fix wrong json object pointed.
Change-Id: Id485aa5ddf8d78a1fc48922cb3c3161fb65dea1b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'ctl-lib')
-rw-r--r--ctl-lib/ctl-action.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ctl-lib/ctl-action.c b/ctl-lib/ctl-action.c
index 0b6a8e7..8df69d0 100644
--- a/ctl-lib/ctl-action.c
+++ b/ctl-lib/ctl-action.c
@@ -131,7 +131,6 @@ STATIC void ActionDynRequest (AFB_ReqT request) {
#endif
// unpack individual action object
-
PUBLIC int ActionLoadOne(AFB_ApiT apiHandle, CtlActionT *action, json_object *actionJ, int exportApi) {
int err, modeCount = 0;
json_object *callbackJ=NULL, *luaJ=NULL, *subcallJ=NULL;
@@ -189,9 +188,9 @@ PUBLIC int ActionLoadOne(AFB_ApiT apiHandle, CtlActionT *action, json_object *ac
modeCount++;
action->type = CTL_TYPE_API;
- err = wrap_json_unpack(luaJ, "{s?s,s:s !}", "api", &action->exec.subcall.api, "verb", &action->exec.subcall.verb);
+ err = wrap_json_unpack(subcallJ, "{s?s,s:s !}", "api", &action->exec.subcall.api, "verb", &action->exec.subcall.verb);
if (err) {
- AFB_ApiError(apiHandle,"ACTION-LOAD-ONE Subcall missing [load]|func in:\n-- %s", json_object_get_string(luaJ));
+ AFB_ApiError(apiHandle,"ACTION-LOAD-ONE Subcall missing [load]|func in:\n-- %s", json_object_get_string(subcallJ));
goto OnErrorExit;
}
}