X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-api-so-v2.c;h=deb8783cda80dd5daef53a7aad596ec998006107;hb=refs%2Fheads%2Fsandbox%2FDDTLK%2Fpakage;hp=6c98ce4d8bb8c20bf33c582400617e109d96322a;hpb=8dab9fdadba1b5263442003e0118c0f0fba6af65;p=src%2Fapp-framework-binder.git diff --git a/src/afb-api-so-v2.c b/src/afb-api-so-v2.c index 6c98ce4d..deb8783c 100644 --- a/src/afb-api-so-v2.c +++ b/src/afb-api-so-v2.c @@ -75,11 +75,11 @@ struct json_object *afb_api_so_v2_make_description_openAPIv3(const struct afb_bi char buffer[256]; const struct afb_verb_v2 *verb; struct json_object *r, *f, *a, *i, *p, *g; - + enum json_tokener_error jerr; if (binding->specification) { - r = json_tokener_parse(binding->specification); - if (r) + r = json_tokener_parse_verbose(binding->specification, &jerr); + if (jerr == json_tokener_success) return r; } @@ -130,7 +130,13 @@ static void do_preinit(int sig, void *closure) } }; -int afb_api_so_v2_add_binding(const struct afb_binding_v2 *binding, void *handle, struct afb_apiset *declare_set, struct afb_apiset * call_set, struct afb_binding_data_v2 *data) +int afb_api_so_v2_add_binding( + const struct afb_binding_v2 *binding, + void *handle, + struct afb_apiset *declare_set, + struct afb_apiset * call_set, + struct afb_binding_data_v2 *data, + const char *path) { int rc; struct afb_export *export; @@ -143,7 +149,7 @@ int afb_api_so_v2_add_binding(const struct afb_binding_v2 *binding, void *handle assert(data); /* allocates the description */ - export = afb_export_create_v2(declare_set, call_set, binding->api, binding, data, binding->init, binding->onevent); + export = afb_export_create_v2(declare_set, call_set, binding->api, binding, data, binding->init, binding->onevent, path); if (!export) { ERROR("out of memory"); goto error; @@ -209,7 +215,7 @@ int afb_api_so_v2_add(const char *path, void *handle, struct afb_apiset *declare goto error; } - return afb_api_so_v2_add_binding(binding, handle, declare_set, call_set, data); + return afb_api_so_v2_add_binding(binding, handle, declare_set, call_set, data, path); error: return -1;