aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/client_session.cpp
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2016-06-18 13:39:26 -0500
committerSubv <subv2112@gmail.com>2016-11-30 23:04:00 -0500
commitd2305d375f14fdbe83b54606c8f8599234ead29b (patch)
tree2acac9450de6b1d8cc42d89f9aa08759d77f9cd9 /src/core/hle/kernel/client_session.cpp
parentedcacd7cdd22b4dc6b1371d78200397eb10fc68d (diff)
IPC/HLE: Associate the ClientSessions with their parent port's HLE interface if it exists.
Pass the triggering ServerSession to the HLE command handler to differentiate which session caused the request.
Diffstat (limited to 'src/core/hle/kernel/client_session.cpp')
-rw-r--r--src/core/hle/kernel/client_session.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/hle/kernel/client_session.cpp b/src/core/hle/kernel/client_session.cpp
index f1ad9b65b4..22fa2ff030 100644
--- a/src/core/hle/kernel/client_session.cpp
+++ b/src/core/hle/kernel/client_session.cpp
@@ -8,6 +8,7 @@
#include "core/hle/kernel/client_session.h"
#include "core/hle/kernel/server_session.h"
#include "core/hle/kernel/kernel.h"
+#include "core/hle/service/service.h"
namespace Kernel {
@@ -20,6 +21,7 @@ ResultVal<SharedPtr<ClientSession>> ClientSession::Create(SharedPtr<ServerSessio
client_session->name = std::move(name);
client_session->server_session = server_session;
client_session->client_port = client_port;
+ client_session->hle_helper = client_port->hle_interface;
return MakeResult<SharedPtr<ClientSession>>(std::move(client_session));
}
@@ -31,10 +33,9 @@ ResultCode ClientSession::HandleSyncRequest() {
if (result.IsError())
return result;
- // Tell the client port to handle the request in case it's an HLE service.
- // The client port can be nullptr for port-less sessions (Like for example File and Directory sessions).
- if (client_port != nullptr)
- result = client_port->HandleSyncRequest();
+ // If this ClientSession has an associated HLE helper, forward the request to it.
+ if (hle_helper != nullptr)
+ result = hle_helper->HandleSyncRequest(server_session);
return result;
}