diff options
author | Subv <subv2112@gmail.com> | 2016-12-05 17:02:08 +0100 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2016-12-05 17:02:08 +0100 |
commit | dd8887c8cfbb6d3010dde240278a3d4018c5dd85 (patch) | |
tree | 9990a463d5daccdab41ae9c90a5c698aed0d4795 /src/core/hle/service/srv.cpp | |
parent | Declare empty ServerSession and ClientSession constructors as default. (diff) | |
download | yuzu-dd8887c8cfbb6d3010dde240278a3d4018c5dd85.tar yuzu-dd8887c8cfbb6d3010dde240278a3d4018c5dd85.tar.gz yuzu-dd8887c8cfbb6d3010dde240278a3d4018c5dd85.tar.bz2 yuzu-dd8887c8cfbb6d3010dde240278a3d4018c5dd85.tar.lz yuzu-dd8887c8cfbb6d3010dde240278a3d4018c5dd85.tar.xz yuzu-dd8887c8cfbb6d3010dde240278a3d4018c5dd85.tar.zst yuzu-dd8887c8cfbb6d3010dde240278a3d4018c5dd85.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/srv.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/core/hle/service/srv.cpp b/src/core/hle/service/srv.cpp index c0abfd711..bb2c8fcc4 100644 --- a/src/core/hle/service/srv.cpp +++ b/src/core/hle/service/srv.cpp @@ -85,21 +85,13 @@ static void GetServiceHandle(Service::Interface* self) { auto it = Service::g_srv_services.find(port_name); if (it != Service::g_srv_services.end()) { - auto client_port = std::get<Kernel::SharedPtr<Kernel::ClientPort>>(it->second); - // The hle_handler will be nullptr if this port was registered by the emulated - // application by means of srv:RegisterService. - auto hle_handler = std::get<std::shared_ptr<Service::Interface>>(it->second); - - // Create a new session pair - auto sessions = Kernel::ServerSession::CreateSessionPair(port_name, hle_handler); - auto client_session = std::get<Kernel::SharedPtr<Kernel::ClientSession>>(sessions); - auto server_session = std::get<Kernel::SharedPtr<Kernel::ServerSession>>(sessions); + auto client_port = it->second; // Note: Threads do not wait for the server endpoint to call // AcceptSession before returning from this call. - // Add the server session to the port's queue - client_port->AddWaitingSession(server_session); + // Connect to the port and retrieve the client endpoint of the connection Session. + auto client_session = client_port->Connect(); // Return the client session cmd_buff[3] = Kernel::g_handle_table.Create(client_session).MoveFrom(); |