Bug 526 - PointToPointNetDevice::PhyTxBegin upcalls with an empty packet
PointToPointNetDevice::PhyTxBegin upcalls with an empty packet
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: devices
ns-3-dev
All All
: P1 normal
Assigned To: Craig Dowell
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-22 15:54 EDT by Rajib Bhattacharjea
Modified: 2009-03-23 14:42 EDT (History)
1 user (show)

See Also:


Attachments
Trivial Fix? (588 bytes, patch)
2009-03-22 23:56 EDT, Rajib Bhattacharjea
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rajib Bhattacharjea 2009-03-22 15:54:05 EDT
bool
PointToPointNetDevice::TransmitStart (Ptr<Packet> p)
{
  NS_LOG_FUNCTION (this << p);
  NS_LOG_LOGIC ("UID is " << p->GetUid () << ")");

  //
  // This function is called to start the process of transmitting a packet.
  // We need to tell the channel that we've started wiggling the wire and
  // schedule an event that will be executed when the transmission is complete.
  //
  NS_ASSERT_MSG(m_txMachineState == READY, "Must be READY to transmit");
  m_txMachineState = BUSY;
  m_phyTxBeginTrace (m_currentPkt);
  m_currentPkt = p;



It seems to me that the order of those last two lines needs to be switched, else the upcall is made with nonsense or with a null packet pointer.  Craig?
Comment 1 Rajib Bhattacharjea 2009-03-22 23:56:14 EDT
Created attachment 400 [details]
Trivial Fix?
Comment 2 Craig Dowell 2009-03-23 14:42:19 EDT
5854cddf4493