X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-api-dyn.c;h=c2d6cdc498ecde8ae9b26f9a58c62f336d9fcb8c;hb=c8558c8a28966110aa3a356f95d3c60afe32b64a;hp=0667f5191827cb4a9530a06da779f4109fa01037;hpb=29cdbe709db6af42775c1abc3499a80ad73159d0;p=src%2Fapp-framework-binder.git diff --git a/src/afb-api-dyn.c b/src/afb-api-dyn.c index 0667f519..c2d6cdc4 100644 --- a/src/afb-api-dyn.c +++ b/src/afb-api-dyn.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016, 2017 "IoT.bzh" + * Copyright (C) 2016, 2017, 2018 "IoT.bzh" * Author José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -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),