diff --git a/src/point-to-point/model/point-to-point-channel.cc b/src/point-to-point/model/point-to-point-channel.cc index d59cbd17b..77dd626d5 100644 --- a/src/point-to-point/model/point-to-point-channel.cc +++ b/src/point-to-point/model/point-to-point-channel.cc @@ -85,7 +85,7 @@ PointToPointChannel::Attach (Ptr device) bool PointToPointChannel::TransmitStart ( - Ptr p, + Ptr p, Ptr src, Time txTime) { @@ -99,7 +99,7 @@ PointToPointChannel::TransmitStart ( Simulator::ScheduleWithContext (m_link[wire].m_dst->GetNode ()->GetId (), txTime + m_delay, &PointToPointNetDevice::Receive, - m_link[wire].m_dst, p); + m_link[wire].m_dst, p->Copy ()); // Call the tx anim callback on the net device m_txrxPointToPoint (p, src, m_link[wire].m_dst, txTime, txTime + m_delay); diff --git a/src/point-to-point/model/point-to-point-channel.h b/src/point-to-point/model/point-to-point-channel.h index e53bfe141..732bfca94 100644 --- a/src/point-to-point/model/point-to-point-channel.h +++ b/src/point-to-point/model/point-to-point-channel.h @@ -78,7 +78,7 @@ public: * \param txTime Transmit time to apply * \returns true if successful (currently always true) */ - virtual bool TransmitStart (Ptr p, Ptr src, Time txTime); + virtual bool TransmitStart (Ptr p, Ptr src, Time txTime); /** * \brief Get number of devices on this channel diff --git a/src/point-to-point/model/point-to-point-remote-channel.cc b/src/point-to-point/model/point-to-point-remote-channel.cc index 40f98cecb..46fe81be3 100644 --- a/src/point-to-point/model/point-to-point-remote-channel.cc +++ b/src/point-to-point/model/point-to-point-remote-channel.cc @@ -55,7 +55,7 @@ PointToPointRemoteChannel::~PointToPointRemoteChannel () bool PointToPointRemoteChannel::TransmitStart ( - Ptr p, + Ptr p, Ptr src, Time txTime) { @@ -70,7 +70,7 @@ PointToPointRemoteChannel::TransmitStart ( #ifdef NS3_MPI // Calculate the rxTime (absolute) Time rxTime = Simulator::Now () + txTime + GetDelay (); - MpiInterface::SendPacket (p, rxTime, dst->GetNode ()->GetId (), dst->GetIfIndex ()); + MpiInterface::SendPacket (p->Copy (), rxTime, dst->GetNode ()->GetId (), dst->GetIfIndex ()); #else NS_FATAL_ERROR ("Can't use distributed simulator without MPI compiled in"); #endif diff --git a/src/point-to-point/model/point-to-point-remote-channel.h b/src/point-to-point/model/point-to-point-remote-channel.h index fd1a9a8a5..f10b2df91 100644 --- a/src/point-to-point/model/point-to-point-remote-channel.h +++ b/src/point-to-point/model/point-to-point-remote-channel.h @@ -66,7 +66,7 @@ public: * \param txTime Transmit time to apply * \returns true if successful (currently always true) */ - virtual bool TransmitStart (Ptr p, Ptr src, + virtual bool TransmitStart (Ptr p, Ptr src, Time txTime); };