IPC: Use the correct size when pushing raw data to the command buffer and fixed pushing domain objects.

Domain object ids are always stored immediately after the raw data.
This commit is contained in:
Subv 2018-01-06 21:14:14 -05:00 committed by bunnei
parent bc8ef64804
commit 226786f0b0
4 changed files with 29 additions and 10 deletions

View file

@ -95,7 +95,7 @@ void HLERequestContext::ParseCommandBuffer(u32_le* src_cmdbuf, bool incoming) {
// If this is an incoming message, only CommandType "Request" has a domain header
// All outgoing domain messages have the domain header
domain_message_header =
std::make_unique<IPC::DomainMessageHeader>(rp.PopRaw<IPC::DomainMessageHeader>());
std::make_unique<IPC::DomainRequestMessageHeader>(rp.PopRaw<IPC::DomainRequestMessageHeader>());
}
data_payload_header =

View file

@ -154,7 +154,11 @@ public:
return buffer_x_desciptors;
}
const std::unique_ptr<IPC::DomainMessageHeader>& GetDomainMessageHeader() const {
const std::vector<IPC::BufferDescriptorABW>& BufferDescriptorA() const {
return buffer_a_desciptors;
}
const std::unique_ptr<IPC::DomainRequestMessageHeader>& GetDomainMessageHeader() const {
return domain_message_header;
}
@ -172,7 +176,7 @@ private:
std::unique_ptr<IPC::CommandHeader> command_header;
std::unique_ptr<IPC::HandleDescriptorHeader> handle_descriptor_header;
std::unique_ptr<IPC::DataPayloadHeader> data_payload_header;
std::unique_ptr<IPC::DomainMessageHeader> domain_message_header;
std::unique_ptr<IPC::DomainRequestMessageHeader> domain_message_header;
std::vector<IPC::BufferDescriptorX> buffer_x_desciptors;
std::vector<IPC::BufferDescriptorABW> buffer_a_desciptors;
std::vector<IPC::BufferDescriptorABW> buffer_b_desciptors;