X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-rest-api.c;fp=src%2Fafb-rest-api.c;h=0de762b1f955aa7a969865a4868479798a1d2877;hb=520bbafb30ce49b94b7825ff553d8cb5bda6d612;hp=febe19f83993366341e6003373b861dc95c3a1e9;hpb=0926cee2a1f7a72c40f4950e44651b5fab02c412;p=src%2Fapp-framework-binder.git diff --git a/src/afb-rest-api.c b/src/afb-rest-api.c index febe19f8..0de762b1 100644 --- a/src/afb-rest-api.c +++ b/src/afb-rest-api.c @@ -79,14 +79,16 @@ static AFB_error doCallPluginApi(AFB_request * request, int apiidx, int verbidx, if (AFB_SESSION_NONE != session) { // add client context to request - clientCtx = ctxClientGet(request, apiidx); + clientCtx = ctxClientGet(request); if (clientCtx == NULL) { request->errcode = MHD_HTTP_INSUFFICIENT_STORAGE; json_object_object_add(jcall, "status", json_object_new_string("fail")); json_object_object_add(jcall, "info", json_object_new_string("Client Session Context Full !!!")); json_object_object_add(jreqt, "request", jcall); goto ExitOnDone; - }; + } + request->context = clientCtx->contexts[apiidx]; + request->uuid = clientCtx->uuid; if (verbose) fprintf(stderr, "Plugin=[%s] Api=[%s] Middleware=[%d] Client=[%p] Uuid=[%s] Token=[%s]\n", request->prefix, request->api, session, clientCtx, clientCtx->uuid, clientCtx->token);