aboutsummaryrefslogtreecommitdiffstats
path: root/ctl-lib
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2018-06-04 16:31:09 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2018-06-06 16:21:40 +0000
commitddd10be19eb13ad154af6d3effa6704f7de182fb (patch)
treebf0a03af0aefdb16cd127dbfdb8fa561fbd9036e /ctl-lib
parent540522a733e8b6b5140cc5e44699d7636240f5e1 (diff)
Make parsing of action loading non blocking
When an action is loaded in controller, parsing the json passed to describe the action was sending back an error if an unknown field was present. Now, the parsing just ignore unknown fields. Bug-AGL: SPEC-1405 Change-Id: If95144ad6190d5d2a45d731e82b28ab4caae7c32 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to 'ctl-lib')
-rw-r--r--ctl-lib/ctl-action.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ctl-lib/ctl-action.c b/ctl-lib/ctl-action.c
index db5ddb8..d8d5729 100644
--- a/ctl-lib/ctl-action.c
+++ b/ctl-lib/ctl-action.c
@@ -301,7 +301,7 @@ int ActionLoadOne(AFB_ApiT apiHandle, CtlActionT *action, json_object *actionJ,
memset(action, 0, sizeof (CtlActionT));
if (actionJ) {
- err = wrap_json_unpack(actionJ, "{ss,s?s,ss,s?s,s?o !}",
+ err = wrap_json_unpack(actionJ, "{ss,s?s,ss,s?s,s?o}",
"uid", &action->uid,
"info", &action->info,
"action", &uri,