--- a/src/spectrum/model/aloha-noack-net-device.cc Tue Jul 05 13:32:33 2011 +0100
+++ b/src/spectrum/model/aloha-noack-net-device.cc Tue Jul 05 18:40:17 2011 +0200
@@ -346,7 +346,7 @@
m_macTxTrace (packet);
-
+ bool sendOk = true;
//
// If the device is idle, transmission starts immediately. Otherwise,
// the transmission will be started by NotifyTransmissionEnd
@@ -366,12 +366,8 @@
if (m_queue->Enqueue (packet) == false)
{
m_macTxDropTrace (packet);
- return false;
+ sendOk = false;
}
- NS_LOG_LOGIC ("transmitting head-of-queue packet");
- m_currentPkt = m_queue->Dequeue ();
- NS_ASSERT (m_currentPkt != 0);
- StartTransmission ();
}
}
else
@@ -381,10 +377,10 @@
if (m_queue->Enqueue (packet) == false)
{
m_macTxDropTrace (packet);
- return false;
+ sendOk = false;
}
}
- return true;
+ return sendOk;
}
void
@@ -425,6 +421,7 @@
{
m_currentPkt = m_queue->Dequeue ();
NS_ASSERT (m_currentPkt);
+ NS_LOG_LOGIC ("scheduling transmission now");
Simulator::ScheduleNow (&AlohaNoackNetDevice::StartTransmission, this);
}
}