Browse Source

check for max number of NACKs

pull/151/head
orignal 10 years ago
parent
commit
8a478e4616
  1. 6
      Streaming.cpp

6
Streaming.cpp

@ -378,6 +378,12 @@ namespace stream
for (auto it: m_SavedPackets) for (auto it: m_SavedPackets)
{ {
auto seqn = it->GetSeqn (); auto seqn = it->GetSeqn ();
if (numNacks + (seqn - nextSeqn) >= 256)
{
LogPrint (eLogError, "Number of NACKs exceeds 256");
htobe32buf (packet + 12, nextSeqn); // change ack Through
break;
}
for (uint32_t i = nextSeqn; i < seqn; i++) for (uint32_t i = nextSeqn; i < seqn; i++)
{ {
htobe32buf (nacks, i); htobe32buf (nacks, i);

Loading…
Cancel
Save