summaryrefslogtreecommitdiffstats
path: root/src/hs-clientmanager.cpp
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2021-02-15 13:52:58 +0200
committerMarius Vlad <marius.vlad@collabora.com>2021-03-03 16:54:40 +0200
commit23e133bed353ac90fd8dcf20857e52ff0f11ebdc (patch)
tree2130a83d8f379caec00656298a028a1815f4c9de /src/hs-clientmanager.cpp
parent8d313058dd04585056f6b2926c1ab9a085d8ae0f (diff)
hs-clientmanager: Do not store always the client context
This incorrectly assumed that by re-using the same client context we could gain access to the *current* client's context. But as we have seen, the fake subscribe mechanism isn't really capable of doing that, requiring a direct connection from the client to have that in. Storing the client context make sense to happen only when we can create it (with a real subscribe verb) and not *re-use* it, and assign it to other applications. This basically reverts it to the way it was previously. Bug-AGL: SPEC-3796 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I643dfe91049efa8937c9a8a21eb6fbb366b3fdcc
Diffstat (limited to 'src/hs-clientmanager.cpp')
-rw-r--r--src/hs-clientmanager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hs-clientmanager.cpp b/src/hs-clientmanager.cpp
index beac816..e880c62 100644
--- a/src/hs-clientmanager.cpp
+++ b/src/hs-clientmanager.cpp
@@ -94,9 +94,10 @@ HS_ClientCtxt* HS_ClientManager::createClientCtxt(afb_req_t req, std::string app
ctxt = new HS_ClientCtxt(appid);
afb_req_session_set_LOA(req, 1);
afb_req_context_set(req, ctxt, cbRemoveClientCtxt);
+
+ appid2ctxt[appid] = ctxt;
}
- appid2ctxt[appid] = ctxt;
return ctxt;
}