X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-api-so.c;h=1db7642822f1452dbb8b466295b07b5c88b0c6dc;hb=bbddc1e584dd01b60042f622f8cecfc69361020b;hp=39a6e9b196784d1ee0c573319ab60f046032a262;hpb=7059e59cddc1c81321639875636e88895bc14309;p=src%2Fapp-framework-binder.git diff --git a/src/afb-api-so.c b/src/afb-api-so.c index 39a6e9b1..1db76428 100644 --- a/src/afb-api-so.c +++ b/src/afb-api-so.c @@ -141,7 +141,7 @@ static void call_check(struct afb_req req, struct afb_context *context, const st afb_context_close(context); afb_req_fail(req, "failed", "invalid token's identity"); return; - } + } } if ((stag & AFB_SESSION_CREATE) != 0) { @@ -152,7 +152,7 @@ static void call_check(struct afb_req req, struct afb_context *context, const st afb_context_change_loa(context, 1); afb_context_refresh(context); } - + if ((stag & (AFB_SESSION_CREATE | AFB_SESSION_RENEW)) != 0) afb_context_refresh(context); @@ -246,6 +246,8 @@ int afb_api_so_add_binding(const char *path) void *handle; struct api_so_desc *desc; struct afb_binding *(*register_function) (const struct afb_binding_interface *interface); + struct afb_verb_desc_v1 fake_verb; + struct afb_binding fake_binding; // This is a loadable library let's check if it's a binding rc = 0; @@ -278,6 +280,14 @@ int afb_api_so_add_binding(const char *path) desc->interface.daemon.itf = &daemon_itf; desc->interface.daemon.closure = desc; + /* for log purpose, a fake binding is needed here */ + desc->binding = &fake_binding; + fake_binding.type = AFB_BINDING_VERSION_1; + fake_binding.v1.info = path; + fake_binding.v1.prefix = path; + fake_binding.v1.verbs = &fake_verb; + fake_verb.name = NULL; + /* init the binding */ NOTICE("binding [%s] calling registering function %s", path, binding_register_function_v1); desc->binding = register_function(&desc->interface);