aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/hle_ipc.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-01-17 12:09:12 -0500
committerGitHub <noreply@github.com>2018-01-17 12:09:12 -0500
commit7172ff4d9a42291f1c3b4de3118b339796c36f11 (patch)
tree81d701cd3a236de9f4763b3e6f43cdc426fe7970 /src/core/hle/kernel/hle_ipc.cpp
parentd92636d424e14002cb44ec3678ffb1192d5e3cc3 (diff)
parentb588cbcb1dd1c4256c6d0011a424af9d888ecb20 (diff)
Merge pull request #62 from bunnei/domain-close-handle
Implement IPC domain command CloseVirtualHandle
Diffstat (limited to 'src/core/hle/kernel/hle_ipc.cpp')
-rw-r--r--src/core/hle/kernel/hle_ipc.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp
index afa09b404..ac62a0d5a 100644
--- a/src/core/hle/kernel/hle_ipc.cpp
+++ b/src/core/hle/kernel/hle_ipc.cpp
@@ -102,13 +102,21 @@ void HLERequestContext::ParseCommandBuffer(u32_le* src_cmdbuf, bool incoming) {
data_payload_header =
std::make_unique<IPC::DataPayloadHeader>(rp.PopRaw<IPC::DataPayloadHeader>());
+ data_payload_offset = rp.GetCurrentOffset();
+
+ if (domain_message_header &&
+ domain_message_header->command ==
+ IPC::DomainMessageHeader::CommandType::CloseVirtualHandle) {
+ // CloseVirtualHandle command does not have SFC* or any data
+ return;
+ }
+
if (incoming) {
ASSERT(data_payload_header->magic == Common::MakeMagic('S', 'F', 'C', 'I'));
} else {
ASSERT(data_payload_header->magic == Common::MakeMagic('S', 'F', 'C', 'O'));
}
- data_payload_offset = rp.GetCurrentOffset();
command = rp.Pop<u32_le>();
rp.Skip(1, false); // The command is actually an u64, but we don't use the high part.
}