diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-11-23 19:00:23 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-11-24 19:12:00 +0100 |
commit | 0ed8e06bf1f34fe3c1e9b72170132f9f261f0fda (patch) | |
tree | a1022e9bd413a1832d80fb958c2ce03bdcdb24ce /ctl-lib/ctl-action.c | |
parent | 22f4773ee8fda1ddff6638b1e4da672488b8d135 (diff) |
Get back lua2c functions parsed at plugin load
Format JSON unpack operations
Change-Id: Iaed0988d8536ad1df60a32a610e69e35485fc9f8
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'ctl-lib/ctl-action.c')
-rw-r--r-- | ctl-lib/ctl-action.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ctl-lib/ctl-action.c b/ctl-lib/ctl-action.c index 80e4484..41ce70b 100644 --- a/ctl-lib/ctl-action.c +++ b/ctl-lib/ctl-action.c @@ -136,8 +136,14 @@ PUBLIC int ActionLoadOne(AFB_ApiT apiHandle, CtlActionT *action, json_object *ac int err, modeCount = 0; json_object *callbackJ=NULL, *luaJ=NULL, *subcallJ=NULL; - err = wrap_json_unpack(actionJ, "{ss,s?s,s?s,s?o,s?o,s?o,s?o !}" - , "uid", &action->uid, "info", &action->info, "privileges", &action->privileges, "callback", &callbackJ, "lua", &luaJ, "subcall", &subcallJ, "args", &action->argsJ); + err = wrap_json_unpack(actionJ, "{ss,s?s,s?s,s?o,s?o,s?o,s?o !}", + "uid", &action->uid, + "info", &action->info, + "privileges", &action->privileges, + "callback", &callbackJ, + "lua", &luaJ, + "subcall", &subcallJ, + "args", &action->argsJ); if (err) { AFB_ApiError(apiHandle,"ACTION-LOAD-ONE Action missing uid|[info]|[callback]|[lua]|[subcall]|[args] in:\n-- %s", json_object_get_string(actionJ)); goto OnErrorExit; |