summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/sm/sm_controller.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-11-04 05:45:56 +0100
committerGitHub <noreply@github.com>2022-11-04 05:45:56 +0100
commit37de88040c1999fed639004fb7200cabb8a5f9c0 (patch)
tree561f8439eb8cabd5f254701aaac05f728cdd1ade /src/core/hle/service/sm/sm_controller.cpp
parentMerge pull request #9154 from liamwhite/new-fb (diff)
parentsm:: avoid excessive port recreation (diff)
downloadyuzu-37de88040c1999fed639004fb7200cabb8a5f9c0.tar
yuzu-37de88040c1999fed639004fb7200cabb8a5f9c0.tar.gz
yuzu-37de88040c1999fed639004fb7200cabb8a5f9c0.tar.bz2
yuzu-37de88040c1999fed639004fb7200cabb8a5f9c0.tar.lz
yuzu-37de88040c1999fed639004fb7200cabb8a5f9c0.tar.xz
yuzu-37de88040c1999fed639004fb7200cabb8a5f9c0.tar.zst
yuzu-37de88040c1999fed639004fb7200cabb8a5f9c0.zip
Diffstat (limited to 'src/core/hle/service/sm/sm_controller.cpp')
-rw-r--r--src/core/hle/service/sm/sm_controller.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/core/hle/service/sm/sm_controller.cpp b/src/core/hle/service/sm/sm_controller.cpp
index 46a8439d8..69e0fe808 100644
--- a/src/core/hle/service/sm/sm_controller.cpp
+++ b/src/core/hle/service/sm/sm_controller.cpp
@@ -15,10 +15,9 @@
namespace Service::SM {
void Controller::ConvertCurrentObjectToDomain(Kernel::HLERequestContext& ctx) {
- ASSERT_MSG(!ctx.Session()->GetSessionRequestManager()->IsDomain(),
- "Session is already a domain");
+ ASSERT_MSG(!ctx.GetManager()->IsDomain(), "Session is already a domain");
LOG_DEBUG(Service, "called, server_session={}", ctx.Session()->GetId());
- ctx.Session()->GetSessionRequestManager()->ConvertToDomainOnRequestEnd();
+ ctx.GetManager()->ConvertToDomainOnRequestEnd();
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(ResultSuccess);
@@ -29,9 +28,7 @@ void Controller::CloneCurrentObject(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service, "called");
auto& process = *ctx.GetThread().GetOwnerProcess();
- auto& parent_session = *ctx.Session()->GetParent();
- auto& session_manager = parent_session.GetServerSession().GetSessionRequestManager();
- auto& session_handler = session_manager->SessionHandler();
+ auto session_manager = ctx.GetManager();
// FIXME: this is duplicated from the SVC, it should just call it instead
// once this is a proper process
@@ -46,13 +43,14 @@ void Controller::CloneCurrentObject(Kernel::HLERequestContext& ctx) {
ASSERT(session != nullptr);
// Initialize the session.
- session->Initialize(nullptr, parent_session.GetName(), session_manager);
+ session->Initialize(nullptr, "");
// Commit the session reservation.
session_reservation.Commit();
- // Register the session.
- session_handler.ClientConnected(&session->GetServerSession());
+ // Register with manager.
+ session_manager->SessionHandler().RegisterSession(&session->GetServerSession(),
+ session_manager);
// We succeeded.
IPC::ResponseBuilder rb{ctx, 2, 0, 1, IPC::ResponseBuilder::Flags::AlwaysMoveHandles};