summaryrefslogtreecommitdiff
path: root/src/core/hle/service/service.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/service.cpp')
-rw-r--r--src/core/hle/service/service.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index d7e09e8f1..e36c35a86 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -167,33 +167,36 @@ void ServiceFrameworkBase::InvokeRequest(Kernel::HLERequestContext& ctx) {
167 handler_invoker(this, info->handler_callback, ctx); 167 handler_invoker(this, info->handler_callback, ctx);
168} 168}
169 169
170ResultCode ServiceFrameworkBase::HandleSyncRequest(Kernel::HLERequestContext& context) { 170ResultCode ServiceFrameworkBase::HandleSyncRequest(Kernel::KServerSession& session,
171 Kernel::HLERequestContext& ctx) {
171 const auto guard = LockService(); 172 const auto guard = LockService();
172 173
173 switch (context.GetCommandType()) { 174 switch (ctx.GetCommandType()) {
174 case IPC::CommandType::Close: { 175 case IPC::CommandType::Close:
175 IPC::ResponseBuilder rb{context, 2}; 176 case IPC::CommandType::TIPC_Close: {
177 session.Close();
178 IPC::ResponseBuilder rb{ctx, 2};
176 rb.Push(RESULT_SUCCESS); 179 rb.Push(RESULT_SUCCESS);
177 return IPC::ERR_REMOTE_PROCESS_DEAD; 180 return IPC::ERR_REMOTE_PROCESS_DEAD;
178 } 181 }
179 case IPC::CommandType::ControlWithContext: 182 case IPC::CommandType::ControlWithContext:
180 case IPC::CommandType::Control: { 183 case IPC::CommandType::Control: {
181 system.ServiceManager().InvokeControlRequest(context); 184 system.ServiceManager().InvokeControlRequest(ctx);
182 break; 185 break;
183 } 186 }
184 case IPC::CommandType::RequestWithContext: 187 case IPC::CommandType::RequestWithContext:
185 case IPC::CommandType::Request: { 188 case IPC::CommandType::Request: {
186 InvokeRequest(context); 189 InvokeRequest(ctx);
187 break; 190 break;
188 } 191 }
189 default: 192 default:
190 UNIMPLEMENTED_MSG("command_type={}", context.GetCommandType()); 193 UNIMPLEMENTED_MSG("command_type={}", ctx.GetCommandType());
191 } 194 }
192 195
193 // If emulation was shutdown, we are closing service threads, do not write the response back to 196 // If emulation was shutdown, we are closing service threads, do not write the response back to
194 // memory that may be shutting down as well. 197 // memory that may be shutting down as well.
195 if (system.IsPoweredOn()) { 198 if (system.IsPoweredOn()) {
196 context.WriteToOutgoingCommandBuffer(context.GetThread()); 199 ctx.WriteToOutgoingCommandBuffer(ctx.GetThread());
197 } 200 }
198 201
199 return RESULT_SUCCESS; 202 return RESULT_SUCCESS;