Browse Source
Merge pull request #443 from ogniK5377/ipc-500
Added IPC RequestWithContext & ControlWithContext
pull/15/merge
Sebastian Valle
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
7 additions and
1 deletions
-
src/core/hle/ipc.h
-
src/core/hle/kernel/hle_ipc.cpp
-
src/core/hle/service/service.cpp
|
|
|
@ -32,6 +32,8 @@ enum class CommandType : u32 { |
|
|
|
Close = 2, |
|
|
|
Request = 4, |
|
|
|
Control = 5, |
|
|
|
RequestWithContext = 6, |
|
|
|
ControlWithContext = 7, |
|
|
|
Unspecified, |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
@ -110,7 +110,9 @@ void HLERequestContext::ParseCommandBuffer(u32_le* src_cmdbuf, bool incoming) { |
|
|
|
// Padding to align to 16 bytes
|
|
|
|
rp.AlignWithPadding(); |
|
|
|
|
|
|
|
if (Session()->IsDomain() && (command_header->type == IPC::CommandType::Request || !incoming)) { |
|
|
|
if (Session()->IsDomain() && ((command_header->type == IPC::CommandType::Request || |
|
|
|
command_header->type == IPC::CommandType::RequestWithContext) || |
|
|
|
!incoming)) { |
|
|
|
// If this is an incoming message, only CommandType "Request" has a domain header
|
|
|
|
// All outgoing domain messages have the domain header, if only incoming has it
|
|
|
|
if (incoming || domain_message_header) { |
|
|
|
|
|
|
|
@ -144,10 +144,12 @@ ResultCode ServiceFrameworkBase::HandleSyncRequest(Kernel::HLERequestContext& co |
|
|
|
rb.Push(RESULT_SUCCESS); |
|
|
|
return ResultCode(ErrorModule::HIPC, ErrorDescription::RemoteProcessDead); |
|
|
|
} |
|
|
|
case IPC::CommandType::ControlWithContext: |
|
|
|
case IPC::CommandType::Control: { |
|
|
|
Core::System::GetInstance().ServiceManager().InvokeControlRequest(context); |
|
|
|
break; |
|
|
|
} |
|
|
|
case IPC::CommandType::RequestWithContext: |
|
|
|
case IPC::CommandType::Request: { |
|
|
|
InvokeRequest(context); |
|
|
|
break; |
|
|
|
|