diff options
| author | 2017-10-31 19:30:05 -0400 | |
|---|---|---|
| committer | 2017-10-31 19:30:05 -0400 | |
| commit | 3597650f221036deb382d4e8812e717014619eee (patch) | |
| tree | e16f1231d1423a16edf40735b9462187d0792138 /src/core/hle/service/service.cpp | |
| parent | hle: Use Switch formatted result codes. (diff) | |
| download | yuzu-3597650f221036deb382d4e8812e717014619eee.tar.gz yuzu-3597650f221036deb382d4e8812e717014619eee.tar.xz yuzu-3597650f221036deb382d4e8812e717014619eee.zip | |
service: Return proper result code for IPC::CommandType::Close.
Diffstat (limited to 'src/core/hle/service/service.cpp')
| -rw-r--r-- | src/core/hle/service/service.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 826a775d1..b5d798e26 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -124,7 +124,7 @@ void ServiceFrameworkBase::InvokeRequest(Kernel::HLERequestContext& ctx) { | |||
| 124 | handler_invoker(this, info->handler_callback, ctx); | 124 | handler_invoker(this, info->handler_callback, ctx); |
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | void ServiceFrameworkBase::HandleSyncRequest(SharedPtr<ServerSession> server_session) { | 127 | ResultCode ServiceFrameworkBase::HandleSyncRequest(SharedPtr<ServerSession> server_session) { |
| 128 | u32* cmd_buf = (u32*)Memory::GetPointer(Kernel::GetCurrentThread()->GetTLSAddress()); | 128 | u32* cmd_buf = (u32*)Memory::GetPointer(Kernel::GetCurrentThread()->GetTLSAddress()); |
| 129 | 129 | ||
| 130 | // TODO(yuriks): The kernel should be the one handling this as part of translation after | 130 | // TODO(yuriks): The kernel should be the one handling this as part of translation after |
| @@ -137,7 +137,7 @@ void ServiceFrameworkBase::HandleSyncRequest(SharedPtr<ServerSession> server_ses | |||
| 137 | case IPC::CommandType::Close: { | 137 | case IPC::CommandType::Close: { |
| 138 | IPC::RequestBuilder rb{context, 1}; | 138 | IPC::RequestBuilder rb{context, 1}; |
| 139 | rb.Push(RESULT_SUCCESS); | 139 | rb.Push(RESULT_SUCCESS); |
| 140 | break; | 140 | return ResultCode(ErrorModule::HIPC, ErrorDescription::RemoteProcessDead); |
| 141 | } | 141 | } |
| 142 | case IPC::CommandType::Control: { | 142 | case IPC::CommandType::Control: { |
| 143 | SM::g_service_manager->InvokeControlRequest(context); | 143 | SM::g_service_manager->InvokeControlRequest(context); |
| @@ -153,6 +153,8 @@ void ServiceFrameworkBase::HandleSyncRequest(SharedPtr<ServerSession> server_ses | |||
| 153 | 153 | ||
| 154 | context.WriteToOutgoingCommandBuffer(cmd_buf, *Kernel::g_current_process, | 154 | context.WriteToOutgoingCommandBuffer(cmd_buf, *Kernel::g_current_process, |
| 155 | Kernel::g_handle_table); | 155 | Kernel::g_handle_table); |
| 156 | |||
| 157 | return RESULT_SUCCESS; | ||
| 156 | } | 158 | } |
| 157 | 159 | ||
| 158 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 160 | //////////////////////////////////////////////////////////////////////////////////////////////////// |