aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-export.c
diff options
context:
space:
mode:
authorJose Bollo <jose.bollo@iot.bzh>2019-11-04 17:57:23 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2019-11-29 12:48:17 +0100
commitb55f3cd48507105e85894be89557787eccfbe22f (patch)
tree337b771a460688087c622e3b27c43c0b5a77a233 /src/afb-export.c
parenteaf5670e9d10b5d7c066043e7563706cf1e01bd5 (diff)
afb-stub-ws: Enforce asynchronous describe
Because remote apis describe themselves asynchronousely, it is better to have asynchronous describe api. Bug-AGL: SPEC-2968 Change-Id: I52b4dab697f229ad01ea2b73d6b8dee22d507912 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-export.c')
-rw-r--r--src/afb-export.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/afb-export.c b/src/afb-export.c
index a9643f54..f96f8f81 100644
--- a/src/afb-export.c
+++ b/src/afb-export.c
@@ -1823,7 +1823,7 @@ static void api_call_cb(void *closure, struct afb_xreq *xreq)
}
}
-static struct json_object *api_describe_cb(void *closure)
+static void api_describe_cb(void *closure, void (*describecb)(void *, struct json_object *), void *clocb)
{
struct afb_export *export = closure;
struct json_object *result;
@@ -1846,7 +1846,7 @@ static struct json_object *api_describe_cb(void *closure)
result = NULL;
break;
}
- return result;
+ describecb(clocb, result);
}
static int api_service_start_cb(void *closure)