@@ -217,6 +217,7 @@ int CRcvBufferNew::dropMessage(int32_t seqnolo, int32_t seqnohi, int32_t msgno)
217
217
if (!m_entries[i].pUnit)
218
218
continue;
219
219
220
+
// TODO: Break the loop if a massege has been found. No need to search further.
220
221
const int32_t msgseq = m_entries[i].pUnit->m_Packet.getMsgSeq(m_bPeerRexmitFlag);
221
222
if (msgseq == msgno)
222
223
{
@@ -261,6 +262,11 @@ int CRcvBufferNew::dropMessage(int32_t seqnolo, int32_t seqnohi, int32_t msgno)
261
262
int iDropCnt = 0;
262
263
for (int i = incPos(m_iStartPos, start_off); i != end_pos && i != last_pos; i = incPos(i))
263
264
{
265
+
// Don't drop messages, if all its packets are already in the buffer.
266
+
// TODO: Don't drop a several-packet message if all packets are in the buffer.
267
+
if (m_entries[i].pUnit && m_entries[i].pUnit->m_Packet.getMsgBoundary() == PB_SOLO)
268
+
continue;
269
+
264
270
dropUnitInPos(i);
265
271
++iDropCnt;
266
272
m_entries[i].status = EntryState_Drop;
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4