X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=plugins%2Fafm-main-plugin%2Fafm-main-plugin.c;h=b026fd80ed6a9e5169975b86a883bd0eb6912166;hb=56f9ef4581d567248b6f83a3b15f39a0aca42895;hp=d86e92634363b23f7e9bf7ab1f64ce953c96c0c2;hpb=04331cc45e03325c6470bc5285d5c09843b24afd;p=src%2Fapp-framework-binder.git diff --git a/plugins/afm-main-plugin/afm-main-plugin.c b/plugins/afm-main-plugin/afm-main-plugin.c index d86e9263..b026fd80 100644 --- a/plugins/afm-main-plugin/afm-main-plugin.c +++ b/plugins/afm-main-plugin/afm-main-plugin.c @@ -91,7 +91,7 @@ static void call_appid(struct afb_req request, const char *method) { struct json_object *obj; char *sid; - const char *id = afb_req_argument(request, _id_); + const char *id = afb_req_value(request, _id_); if (id == NULL) { afb_req_fail(request, "bad-request", "missing 'id'"); return; @@ -114,7 +114,7 @@ static void call_appid(struct afb_req request, const char *method) static void call_runid(struct afb_req request, const char *method) { struct json_object *obj; - const char *id = afb_req_argument(request, _runid_); + const char *id = afb_req_value(request, _runid_); if (id == NULL) { afb_req_fail(request, "bad-request", "missing 'runid'"); return; @@ -151,13 +151,13 @@ static void start(struct afb_req request) int rc; /* get the id */ - id = afb_req_argument(request, _id_); + id = afb_req_value(request, _id_); if (id == NULL) { afb_req_fail(request, "bad-request", "missing 'id'"); return; } /* get the mode */ - mode = afb_req_argument(request, _mode_); + mode = afb_req_value(request, _mode_); if (mode == NULL || !strcmp(mode, _auto_)) { mode = interface->mode == AFB_MODE_REMOTE ? _remote_ : _local_; } @@ -221,8 +221,8 @@ static void install(struct afb_req request) /* get the argument */ arg = afb_req_get(request, "widget"); - filename = arg.value; - if (filename == NULL || !arg.is_file) { + filename = arg.path; + if (filename == NULL) { afb_req_fail(request, "bad-request", "missing 'widget' file"); return; }