diff options
author | bunnei <bunneidev@gmail.com> | 2021-04-14 02:48:37 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-05-06 01:40:51 +0200 |
commit | 7444963bbb300cff269e410948de7fa577f5ff16 (patch) | |
tree | 6e0000cb345dc02c8f2ca38958b7c90383f45b03 /src/core/hle/kernel/client_port.cpp | |
parent | hle: kernel: svc: Migrate GetThreadContext, GetThreadCoreMask. (diff) | |
download | yuzu-7444963bbb300cff269e410948de7fa577f5ff16.tar yuzu-7444963bbb300cff269e410948de7fa577f5ff16.tar.gz yuzu-7444963bbb300cff269e410948de7fa577f5ff16.tar.bz2 yuzu-7444963bbb300cff269e410948de7fa577f5ff16.tar.lz yuzu-7444963bbb300cff269e410948de7fa577f5ff16.tar.xz yuzu-7444963bbb300cff269e410948de7fa577f5ff16.tar.zst yuzu-7444963bbb300cff269e410948de7fa577f5ff16.zip |
Diffstat (limited to 'src/core/hle/kernel/client_port.cpp')
-rw-r--r-- | src/core/hle/kernel/client_port.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/hle/kernel/client_port.cpp b/src/core/hle/kernel/client_port.cpp index d856b83e3..ce88da1c3 100644 --- a/src/core/hle/kernel/client_port.cpp +++ b/src/core/hle/kernel/client_port.cpp @@ -3,11 +3,10 @@ // Refer to the license.txt file included. #include "core/hle/kernel/client_port.h" -#include "core/hle/kernel/client_session.h" #include "core/hle/kernel/hle_ipc.h" +#include "core/hle/kernel/k_session.h" #include "core/hle/kernel/object.h" #include "core/hle/kernel/server_port.h" -#include "core/hle/kernel/session.h" #include "core/hle/kernel/svc_results.h" namespace Kernel { @@ -19,21 +18,22 @@ std::shared_ptr<ServerPort> ClientPort::GetServerPort() const { return server_port; } -ResultVal<std::shared_ptr<ClientSession>> ClientPort::Connect() { +ResultVal<KClientSession*> ClientPort::Connect() { if (active_sessions >= max_sessions) { return ResultOutOfSessions; } active_sessions++; - auto [client, server] = Kernel::Session::Create(kernel, name); + auto* session = Kernel::KSession::Create(kernel); + session->Initialize(name + ":ClientPort"); if (server_port->HasHLEHandler()) { - server_port->GetHLEHandler()->ClientConnected(client, std::move(server)); + server_port->GetHLEHandler()->ClientConnected(session); } else { - server_port->AppendPendingSession(std::move(server)); + server_port->AppendPendingSession(std::addressof(session->GetServerSession())); } - return MakeResult(std::move(client)); + return MakeResult(std::addressof(session->GetClientSession())); } void ClientPort::ConnectionClosed() { |