summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/sm/sm_controller.cpp
diff options
context:
space:
mode:
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};