csma: Avoid scheduling Receive() on own NetDevice
This commit is contained in:
committed by
Tommaso Pecorella
parent
af86894475
commit
cd353a538f
@@ -223,10 +223,9 @@ CsmaChannel::TransmitEnd ()
|
||||
NS_LOG_LOGIC ("Receive");
|
||||
|
||||
std::vector<CsmaDeviceRec>::iterator it;
|
||||
uint32_t devId = 0;
|
||||
for (it = m_deviceList.begin (); it < m_deviceList.end (); it++)
|
||||
{
|
||||
if (it->IsActive ())
|
||||
if (it->IsActive () && it->devicePtr != m_deviceList[m_currentSrc].devicePtr)
|
||||
{
|
||||
// schedule reception events
|
||||
Simulator::ScheduleWithContext (it->devicePtr->GetNode ()->GetId (),
|
||||
@@ -234,7 +233,6 @@ CsmaChannel::TransmitEnd ()
|
||||
&CsmaNetDevice::Receive, it->devicePtr,
|
||||
m_currentPkt->Copy (), m_deviceList[m_currentSrc].devicePtr);
|
||||
}
|
||||
devId++;
|
||||
}
|
||||
|
||||
// also schedule for the tx side to go back to IDLE
|
||||
|
||||
Reference in New Issue
Block a user