diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2021-02-15 13:51:13 +0200 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2021-02-24 14:37:53 +0200 |
commit | 8d313058dd04585056f6b2926c1ab9a085d8ae0f (patch) | |
tree | c96ecc421ed0358557e50281ab66c03b86599000 | |
parent | 0d8820686585bb1225358e43aab282d34d93f7e5 (diff) |
hs-proxy: Avoid creating a client context
The subscribe mechanism requires that the client itself performs the
subscribe (it assumes a unique, distinct afb_req_t type in order to
create the client context) and attempting to handle one,
automatically would not really work, so only use it (the fake sub mechanism)
the keep track of application w/ the help of the client_list.
Bug-AGL: SPEC-3796
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I783614e1db83280878b77b786e4f80fccd1a74a1
-rw-r--r-- | src/hs-proxy.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/hs-proxy.cpp b/src/hs-proxy.cpp index 33e5d53..8e02b2e 100644 --- a/src/hs-proxy.cpp +++ b/src/hs-proxy.cpp @@ -56,7 +56,6 @@ static void api_callback(void *closure, struct json_object *object, const char * /* if we have an error then we couldn't start the application so we remove it */ if (error) { - clientManager->removeClientCtxt(cdata->clientCtx); clientManager->removeClient(cdata->appid); } @@ -180,12 +179,6 @@ void HS_AfmMainProxy::start(struct hs_instance *instance, afb_req_t request, con return; } - cdata->clientCtx = clientManager->createClientCtxt(request, id); - HS_Client *client = clientManager->addClient(request, id); - if (client) { - if (client->handleRequest(request, "subscribe")) - AFB_WARNING("Failed to handle subcribe\n"); - } - - api_call(request->api, _afm_main, __FUNCTION__, args, cdata); + clientManager->addClient(request, id); + api_call(request->api, _afm_main, __FUNCTION__, json_object_new_string(id.c_str()), cdata); } |