diff options
author | José Bollo <jose.bollo@iot.bzh> | 2016-04-08 15:14:59 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2016-04-08 15:14:59 +0200 |
commit | 56f9ef4581d567248b6f83a3b15f39a0aca42895 (patch) | |
tree | 607fddaf6c62515126768b86d3e7e7df1112153a /plugins/afm-main-plugin | |
parent | 6ea1d50ab6571551e1d0379940349911956c97ee (diff) |
refactoring req interface
Change-Id: I6fc9246099c34f62c82e060cf014a63b0e8f63d8
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'plugins/afm-main-plugin')
-rw-r--r-- | plugins/afm-main-plugin/afm-main-plugin.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/afm-main-plugin/afm-main-plugin.c b/plugins/afm-main-plugin/afm-main-plugin.c index a23b1971..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_; } |