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.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Protocol/Protocol_1_8.cpp') diff --git a/src/Protocol/Protocol_1_8.cpp b/src/Protocol/Protocol_1_8.cpp index 205a899c1..02b76ccae 100644 --- a/src/Protocol/Protocol_1_8.cpp +++ b/src/Protocol/Protocol_1_8.cpp @@ -174,7 +174,7 @@ cProtocol_1_8_0::cProtocol_1_8_0(cClientHandle * a_Client, const AString & a_Ser -void cProtocol_1_8_0::DataReceived(cByteBuffer & a_Buffer, ContiguousByteBuffer && a_Data) +void cProtocol_1_8_0::DataReceived(cByteBuffer & a_Buffer, ContiguousByteBuffer & a_Data) { if (m_IsEncrypted) { -- cgit v1.2.3