diff options
| author | Subv <subv2112@gmail.com> | 2016-12-05 13:59:57 -0500 |
|---|---|---|
| committer | Subv <subv2112@gmail.com> | 2016-12-05 13:59:57 -0500 |
| commit | c93c5a72bb46796e898f54a7c13dfb8d941ddd4d (patch) | |
| tree | 1e5bded69840948daaa8b27bcba05a14b38dcb75 /src/core/hle/service | |
| parent | 61a2fe8c3bcd5e6dc7e97945b923d1a5bd8099ec (diff) | |
Return an error code when connecting to a saturated port.
The error code was taken from the 3DS kernel.
Diffstat (limited to 'src/core/hle/service')
| -rw-r--r-- | src/core/hle/service/srv.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/hle/service/srv.cpp b/src/core/hle/service/srv.cpp index bb2c8fcc4..ff7a84347 100644 --- a/src/core/hle/service/srv.cpp +++ b/src/core/hle/service/srv.cpp @@ -93,8 +93,12 @@ static void GetServiceHandle(Service::Interface* self) { // Connect to the port and retrieve the client endpoint of the connection Session. auto client_session = client_port->Connect(); - // Return the client session - cmd_buff[3] = Kernel::g_handle_table.Create(client_session).MoveFrom(); + res = client_session.Code(); + + if (client_session.Succeeded()) { + // Return the client session + cmd_buff[3] = Kernel::g_handle_table.Create(*client_session).MoveFrom(); + } LOG_TRACE(Service_SRV, "called port=%s, handle=0x%08X", port_name.c_str(), cmd_buff[3]); } else { LOG_ERROR(Service_SRV, "(UNIMPLEMENTED) called port=%s", port_name.c_str()); |
