From e9265b1d0129e56b9b665019697055bd63229fde Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sat, 10 Jul 2021 21:04:49 +0100 Subject: Symmetry in MultiVersionProtocol to fix a crash (#5261) + Add HandleOutgoingData, which tests for m_Protocol before calling DataPrepared. * Change std::function to bool + if/else to handle incoming data; it's almost certainly faster. * Fixes #5260 --- src/Protocol/Protocol_1_8.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Protocol/Protocol_1_8.h') diff --git a/src/Protocol/Protocol_1_8.h b/src/Protocol/Protocol_1_8.h index 838435ad0..704725bee 100644 --- a/src/Protocol/Protocol_1_8.h +++ b/src/Protocol/Protocol_1_8.h @@ -36,7 +36,7 @@ public: cProtocol_1_8_0(cClientHandle * a_Client, const AString & a_ServerAddress, State a_State); - virtual void DataReceived(cByteBuffer & a_Buffer, ContiguousByteBuffer && a_Data) override; + virtual void DataReceived(cByteBuffer & a_Buffer, ContiguousByteBuffer & a_Data) override; virtual void DataPrepared(ContiguousByteBuffer & a_Data) override; // Sending stuff to clients (alphabetically sorted): -- cgit v1.2.3