Bug 2008 - [lr-wpan] crash if ending rx while status change is in progress
This commit is contained in:
@@ -285,7 +285,7 @@ LrWpanPhy::StartRx (Ptr<SpectrumSignalParameters> spectrumRxParams)
|
||||
|
||||
Ptr<LrWpanSpectrumSignalParameters> lrWpanRxParams = DynamicCast<LrWpanSpectrumSignalParameters> (spectrumRxParams);
|
||||
|
||||
if ( lrWpanRxParams == 0)
|
||||
if (lrWpanRxParams == 0)
|
||||
{
|
||||
CheckInterference ();
|
||||
m_signal->AddSignal (spectrumRxParams->psd);
|
||||
@@ -450,7 +450,11 @@ LrWpanPhy::EndRx (Ptr<SpectrumSignalParameters> par)
|
||||
m_edPower.lastUpdate = now;
|
||||
}
|
||||
|
||||
CheckInterference ();
|
||||
Ptr<LrWpanSpectrumSignalParameters> currentRxParams = m_currentRxPacket.first;
|
||||
if (currentRxParams == params)
|
||||
{
|
||||
CheckInterference ();
|
||||
}
|
||||
|
||||
// Update the interference.
|
||||
m_signal->RemoveSignal (par->psd);
|
||||
@@ -462,7 +466,6 @@ LrWpanPhy::EndRx (Ptr<SpectrumSignalParameters> par)
|
||||
}
|
||||
|
||||
// If this is the end of the currently received packet, check if reception was successful.
|
||||
Ptr<LrWpanSpectrumSignalParameters> currentRxParams = m_currentRxPacket.first;
|
||||
if (currentRxParams == params)
|
||||
{
|
||||
Ptr<Packet> currentPacket = currentRxParams->packetBurst->GetPackets ().front ();
|
||||
|
||||
@@ -189,7 +189,7 @@ LrWpanCollisionTestCase::DoRun (void)
|
||||
Simulator::Run ();
|
||||
|
||||
std::cout << "m_rxPackets = " << int(m_rxPackets) << std::endl;
|
||||
NS_TEST_EXPECT_MSG_EQ (m_rxPackets, 0, "Received a packet (as expected)");
|
||||
NS_TEST_EXPECT_MSG_EQ (m_rxPackets, 1, "Received a packet (as expected)");
|
||||
|
||||
// Fourth case: two concurrent tx and ACKs
|
||||
std::cout << "*** Fourth test " << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user