mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-12 11:38:01 -05:00
kernel: invert session request handling flow
This commit is contained in:
@ -24,6 +24,7 @@
|
||||
#include "core/hle/kernel/k_memory_block.h"
|
||||
#include "core/hle/kernel/k_memory_layout.h"
|
||||
#include "core/hle/kernel/k_page_table.h"
|
||||
#include "core/hle/kernel/k_port.h"
|
||||
#include "core/hle/kernel/k_process.h"
|
||||
#include "core/hle/kernel/k_readable_event.h"
|
||||
#include "core/hle/kernel/k_resource_limit.h"
|
||||
@ -382,10 +383,11 @@ static Result ConnectToNamedPort(Core::System& system, Handle* out, VAddr port_n
|
||||
|
||||
// Create a session.
|
||||
KClientSession* session{};
|
||||
R_TRY(port->CreateSession(std::addressof(session),
|
||||
std::make_shared<SessionRequestManager>(kernel)));
|
||||
R_TRY(port->CreateSession(std::addressof(session)));
|
||||
port->Close();
|
||||
|
||||
kernel.RegisterNamedServiceHandler(port_name, &port->GetParent()->GetServerPort());
|
||||
|
||||
// Register the session in the table, close the extra reference.
|
||||
handle_table.Register(*out, session);
|
||||
session->Close();
|
||||
|
Reference in New Issue
Block a user