[*] Update send packet

This commit is contained in:
Reece Wilson 2024-09-07 09:33:46 +01:00
parent b24a938e72
commit fbfcdd3041

View File

@ -103,7 +103,7 @@ bool AuRPCPipe::SendPacket(const AuRPCPipePacket &packet)
}
transactionObject->packet = packet;
transactionObject->view = packet.clientRequest ? packet.clientRequest->GetData() : *packet.serverResponse->message;
transactionObject->view = packet.clientRequest ? packet.clientRequest->GetData() : AuMemoryViewRead(*packet.serverResponse->message);
transactionObject->transaction = ioTransaction;
transactionObject->transaction->SetCallback(transactionObject);
@ -124,7 +124,7 @@ bool AuRPCPipe::SendPacket(const AuRPCPipePacket &packet)
{
transactionObject->SendClient();
if (!transactionObject->transaction->StartWrite(0, AuSPtr<AuMemoryViewRead>(transactionObject->SharedFromThis(), &transactionObject->view)))
if (!transactionObject->transaction->StartWrite(0, AuMemoryViewRead(transactionObject->view, transactionObject->SharedFromThis())))
{
transactionObject->Fail();
}
@ -134,7 +134,7 @@ bool AuRPCPipe::SendPacket(const AuRPCPipePacket &packet)
{
transactionObject->SendClient();
if (!transactionObject->transaction->StartWrite(0, AuSPtr<AuMemoryViewRead>(transactionObject->SharedFromThis(), &transactionObject->view)))
if (!transactionObject->transaction->StartWrite(0, AuMemoryViewRead(transactionObject->view, transactionObject->SharedFromThis())))
{
transactionObject->Fail();
}