X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-xreq.c;h=9c0ba16e2405ea425f809fc100e6dac5820dbb43;hb=f2e72e1858d0be1a9cf3c0c4263f0bd81570d0e8;hp=696bf9d4bc6cac692364a9b715122e599c91a3ac;hpb=91b744a510bbf41526f0931df2320379bec87c38;p=src%2Fapp-framework-binder.git diff --git a/src/afb-xreq.c b/src/afb-xreq.c index 696bf9d4..9c0ba16e 100644 --- a/src/afb-xreq.c +++ b/src/afb-xreq.c @@ -1030,12 +1030,10 @@ void afb_xreq_process(struct afb_xreq *xreq, struct afb_apiset *apiset) xreq->context.api_key = api; /* check self locking */ - if (!api->noconcurrency) - api = NULL; - else { + if (api->group) { caller = xreq->caller; while (caller) { - if (caller->context.api_key == api) { + if (((const struct afb_api *)caller->context.api_key)->group == api->group) { /* noconcurrency lock detected */ ERROR("self-lock detected in call stack for API %s", xreq->api); early_failure(xreq, "self-locked", "recursive self lock, API %s", xreq->api); @@ -1047,7 +1045,7 @@ void afb_xreq_process(struct afb_xreq *xreq, struct afb_apiset *apiset) /* queue the request job */ afb_xreq_unhooked_addref(xreq); - if (jobs_queue(api, afb_apiset_timeout_get(apiset), process_async, xreq) < 0) { + if (jobs_queue(api->group, afb_apiset_timeout_get(apiset), process_async, xreq) < 0) { /* TODO: allows or not to proccess it directly as when no threading? (see above) */ ERROR("can't process job with threads: %m"); early_failure(xreq, "cancelled", "not able to create a job for the task");