diff options
author | José Bollo <jose.bollo@iot.bzh> | 2017-08-11 11:08:56 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2017-08-11 16:50:43 +0200 |
commit | 53c7b44e96e6015a4da4f88f22e98b13cfa2e056 (patch) | |
tree | c6063d881e53866871845fda199e12a7d14ae3b3 /src/afb-stub-ws.c | |
parent | ec68c44857603c9f5bb77a44d8163d837ac5a55a (diff) |
afb-apiset: add a wrapper for 'describe'
And use it in monitor.
Change-Id: I9efbd19cfbdc665d1d686831b529ebaa7bd917a2
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-stub-ws.c')
-rw-r--r-- | src/afb-stub-ws.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/afb-stub-ws.c b/src/afb-stub-ws.c index fa7e4894..351b3320 100644 --- a/src/afb-stub-ws.c +++ b/src/afb-stub-ws.c @@ -1083,17 +1083,11 @@ static void server_send_description(struct afb_stub_ws *stubws, uint32_t descid, static void server_describe_job(int signum, void *closure) { - struct afb_api api; struct json_object *obj; struct server_describe *desc = closure; /* get the description if possible */ - obj = NULL; - if (!signum - && !afb_apiset_get(desc->stubws->apiset, desc->stubws->apiname, &api) - && api.itf->describe) { - obj = api.itf->describe(api.closure); - } + obj = !signum ? afb_apiset_describe(desc->stubws->apiset, desc->stubws->apiname) : NULL; /* send it */ server_send_description(desc->stubws, desc->descid, obj); |