diff options
author | José Bollo <jose.bollo@iot.bzh> | 2017-11-03 13:58:33 +0100 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2017-11-03 13:58:33 +0100 |
commit | 913e41d02977ee045490fbdcc94979c122c6a981 (patch) | |
tree | e11ef708dfd2a565c9f58a3daacc9fa7d98030f3 /src/afb-api-dyn.c | |
parent | 7ffecab08bf91e26ffedb393d9b8cb6151e2b836 (diff) |
Add 'noconcurrency' when creating dynamic APIeel_4.99.2eel/4.99.24.99.2
Change-Id: Ia108b23b9480bb32f27127ef00c18086fcf86752
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-api-dyn.c')
-rw-r--r-- | src/afb-api-dyn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/afb-api-dyn.c b/src/afb-api-dyn.c index 0667f519..2ef1b1a5 100644 --- a/src/afb-api-dyn.c +++ b/src/afb-api-dyn.c @@ -235,7 +235,7 @@ static struct afb_api_itf dyn_api_itf = { .describe = describe_cb }; -int afb_api_dyn_add(struct afb_apiset *apiset, const char *name, const char *info, int (*preinit)(void*, struct afb_dynapi*), void *closure) +int afb_api_dyn_add(struct afb_apiset *apiset, const char *name, const char *info, int noconcurrency, int (*preinit)(void*, struct afb_dynapi*), void *closure) { int rc; struct afb_api_dyn *dynapi; @@ -266,7 +266,7 @@ int afb_api_dyn_add(struct afb_apiset *apiset, const char *name, const char *inf /* records the binding */ afb_api.closure = dynapi; afb_api.itf = &dyn_api_itf; - afb_api.group = NULL; + afb_api.group = noconcurrency ? dynapi : NULL; if (afb_apiset_add(apiset, afb_export_apiname(dynapi->export), afb_api) < 0) { ERROR("dynamic api %s can't be registered to set %s, ABORTING it!", afb_export_apiname(dynapi->export), |