diff options
author | bunnei <bunneidev@gmail.com> | 2021-06-10 07:53:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-10 07:53:25 +0200 |
commit | 74f0087bfa673a530d88231b64c73acc3861fce9 (patch) | |
tree | 2e810f84e6d0f3ae62444ee3ba62cb91a48e5cfd /src/core/hle/service/sm/sm.cpp | |
parent | Merge pull request #6439 from lat9nq/ci-no-7z (diff) | |
parent | hle: kernel: KClientPort: Add an assert for session count. (diff) | |
download | yuzu-74f0087bfa673a530d88231b64c73acc3861fce9.tar yuzu-74f0087bfa673a530d88231b64c73acc3861fce9.tar.gz yuzu-74f0087bfa673a530d88231b64c73acc3861fce9.tar.bz2 yuzu-74f0087bfa673a530d88231b64c73acc3861fce9.tar.lz yuzu-74f0087bfa673a530d88231b64c73acc3861fce9.tar.xz yuzu-74f0087bfa673a530d88231b64c73acc3861fce9.tar.zst yuzu-74f0087bfa673a530d88231b64c73acc3861fce9.zip |
Diffstat (limited to 'src/core/hle/service/sm/sm.cpp')
-rw-r--r-- | src/core/hle/service/sm/sm.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp index bffa9ffcb..a1e1a7d76 100644 --- a/src/core/hle/service/sm/sm.cpp +++ b/src/core/hle/service/sm/sm.cpp @@ -164,18 +164,18 @@ ResultVal<Kernel::KClientSession*> SM::GetServiceImpl(Kernel::HLERequestContext& R_UNLESS(session_reservation.Succeeded(), Kernel::ResultLimitReached); // Create a new session. - auto* session = Kernel::KSession::Create(kernel); - session->Initialize(&port->GetClientPort(), std::move(name)); + Kernel::KClientSession* session{}; + port->GetClientPort().CreateSession(std::addressof(session)); // Commit the session reservation. session_reservation.Commit(); // Enqueue the session with the named port. - port->EnqueueSession(&session->GetServerSession()); + port->EnqueueSession(&session->GetParent()->GetServerSession()); LOG_DEBUG(Service_SM, "called service={} -> session={}", name, session->GetId()); - return MakeResult(&session->GetClientSession()); + return MakeResult(session); } void SM::RegisterService(Kernel::HLERequestContext& ctx) { |