mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 23:02:47 +01:00
hle: kernel: svc: Update ConnectToNamedPort to use new CreateNamedServicePort interface.
This commit is contained in:
parent
c6de9657be
commit
f54ea749a4
1 changed files with 3 additions and 4 deletions
|
@ -284,12 +284,11 @@ static ResultCode ConnectToNamedPort(Core::System& system, Handle* out, VAddr po
|
||||||
auto& handle_table = kernel.CurrentProcess()->GetHandleTable();
|
auto& handle_table = kernel.CurrentProcess()->GetHandleTable();
|
||||||
|
|
||||||
// Find the client port.
|
// Find the client port.
|
||||||
const auto it = kernel.FindNamedPort(port_name);
|
auto port = kernel.CreateNamedServicePort(port_name);
|
||||||
if (!kernel.IsValidNamedPort(it)) {
|
if (!port) {
|
||||||
LOG_WARNING(Kernel_SVC, "tried to connect to unknown port: {}", port_name);
|
LOG_ERROR(Kernel_SVC, "tried to connect to unknown port: {}", port_name);
|
||||||
return ResultNotFound;
|
return ResultNotFound;
|
||||||
}
|
}
|
||||||
auto port = it->second;
|
|
||||||
|
|
||||||
// Reserve a handle for the port.
|
// Reserve a handle for the port.
|
||||||
// NOTE: Nintendo really does write directly to the output handle here.
|
// NOTE: Nintendo really does write directly to the output handle here.
|
||||||
|
|
Loading…
Reference in a new issue