From 15b4dfbecb12deee15956dbcf6dd708e05ed1c7d Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 6 Aug 2014 15:44:00 -0400 Subject: [PATCH] don't futher process plain Ack --- Streaming.cpp | 8 ++++++++ Streaming.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/Streaming.cpp b/Streaming.cpp index af23d2c9..c75464f6 100644 --- a/Streaming.cpp +++ b/Streaming.cpp @@ -54,6 +54,14 @@ namespace stream m_SendStreamID = packet->GetReceiveStreamID (); uint32_t receivedSeqn = packet->GetSeqn (); + if (!receivedSeqn && !packet->IsSYN ()) + { + // plain ack + LogPrint ("Plain ACK received"); + delete packet; + return; + } + LogPrint ("Received seqn=", receivedSeqn); if (!receivedSeqn || receivedSeqn == m_LastReceivedSequenceNumber + 1) { diff --git a/Streaming.h b/Streaming.h index 84611a2a..c76f508a 100644 --- a/Streaming.h +++ b/Streaming.h @@ -55,6 +55,8 @@ namespace stream uint16_t GetOptionSize () const { return be16toh (*(uint16_t *)GetOption ()); }; const uint8_t * GetOptionData () const { return GetOption () + 2; }; const uint8_t * GetPayload () const { return GetOptionData () + GetOptionSize (); }; + + bool IsSYN () const { return GetFlags () & PACKET_FLAG_SYNCHRONIZE; }; }; struct PacketCmp