wifi: Add a parameter to HasBar to remove the BAR from the queue
This commit is contained in:
@@ -432,13 +432,16 @@ BlockAckManager::RemovePacket (uint8_t tid, Mac48Address recipient, uint16_t seq
|
||||
}
|
||||
|
||||
bool
|
||||
BlockAckManager::HasBar (Bar &bar)
|
||||
BlockAckManager::HasBar (Bar &bar, bool remove)
|
||||
{
|
||||
CleanupBuffers ();
|
||||
if (m_bars.size () > 0)
|
||||
{
|
||||
bar = m_bars.front ();
|
||||
m_bars.pop_front ();
|
||||
if (remove)
|
||||
{
|
||||
m_bars.pop_front ();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -166,10 +166,11 @@ public:
|
||||
* Returns true if the BAR is scheduled. Returns false otherwise.
|
||||
*
|
||||
* \param bar
|
||||
* \param remove true if the BAR has to be removed from the queue
|
||||
*
|
||||
* \return true if a BAR is scheduled, false otherwise
|
||||
*/
|
||||
bool HasBar (Bar &bar);
|
||||
bool HasBar (Bar &bar, bool remove = true);
|
||||
/**
|
||||
* Returns true if there are packets that need of retransmission or at least a
|
||||
* BAR is scheduled. Returns false otherwise.
|
||||
|
||||
Reference in New Issue
Block a user