summaryrefslogtreecommitdiffstats
path: root/src/hs-clientmanager.cpp
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-08-17 12:57:07 +0300
committerMarius Vlad <marius.vlad@collabora.com>2020-08-19 16:14:47 +0300
commitf6c6f42502ba2919f23f553239dd8b117440b365 (patch)
treedc7f88a4ba0bbc111036f61123e6c780331e299f /src/hs-clientmanager.cpp
parent58eebeba6beb38861add052b9f4641f85906c8f1 (diff)
hs-clientmanager: Store the appidClientContext directly
Make client related methods public to be able to call them from other callsites. Bug-AGL: SPEC-3524 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I7e13b83564bb6e5d49b760c27665b44d09b0ee94
Diffstat (limited to 'src/hs-clientmanager.cpp')
-rw-r--r--src/hs-clientmanager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/hs-clientmanager.cpp b/src/hs-clientmanager.cpp
index 9b62808..7c2adc5 100644
--- a/src/hs-clientmanager.cpp
+++ b/src/hs-clientmanager.cpp
@@ -95,6 +95,8 @@ HS_ClientCtxt* HS_ClientManager::createClientCtxt(afb_req_t req, std::string app
afb_req_session_set_LOA(req, 1);
afb_req_context_set(req, ctxt, cbRemoveClientCtxt);
}
+
+ appid2ctxt[appid] = ctxt;
return ctxt;
}
@@ -186,7 +188,7 @@ int HS_ClientManager::handleRequest(afb_req_t request, const char *verb, const c
}
else {
if(!strcasecmp(verb, "subscribe")) {
- appid2ctxt[id] = createClientCtxt(request, id);
+ createClientCtxt(request, id);
HS_Client* client = addClient(request, id);
ret = client->handleRequest(request, "subscribe");
}