constify
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Thu, 12 Jun 2008 11:14:54 -0700
changeset 3899 804d92c1f7c3
parent 3898 0d0517e7a557
child 3900 1687492ff059
constify
src/devices/wifi/mac-low.cc
src/devices/wifi/mac-low.h
src/devices/wifi/wifi-phy-state-helper.cc
src/devices/wifi/wifi-phy.h
--- a/src/devices/wifi/mac-low.cc	Thu Jun 12 11:06:56 2008 -0700
+++ b/src/devices/wifi/mac-low.cc	Thu Jun 12 11:14:54 2008 -0700
@@ -414,7 +414,7 @@
 }
 
 void
-MacLow::ReceiveError (Ptr<Packet> packet, double rxSnr)
+MacLow::ReceiveError (Ptr<const Packet> packet, double rxSnr)
 {
   NS_LOG_FUNCTION (this << packet << rxSnr);
   MY_DEBUG ("rx failed ");
--- a/src/devices/wifi/mac-low.h	Thu Jun 12 11:06:56 2008 -0700
+++ b/src/devices/wifi/mac-low.h	Thu Jun 12 11:14:54 2008 -0700
@@ -339,7 +339,7 @@
    * This method is typically invoked by the lower PHY layer to notify
    * the MAC layer that a packet was unsuccessfully received.
    */
-  void ReceiveError (Ptr<Packet> packet, double rxSnr);
+  void ReceiveError (Ptr<const Packet> packet, double rxSnr);
 private:
   void CancelAllEvents (void);
   uint32_t GetAckSize (void) const;
--- a/src/devices/wifi/wifi-phy-state-helper.cc	Thu Jun 12 11:06:56 2008 -0700
+++ b/src/devices/wifi/wifi-phy-state-helper.cc	Thu Jun 12 11:14:54 2008 -0700
@@ -301,8 +301,7 @@
   DoSwitchFromSync ();
   if (!m_syncErrorCallback.IsNull ())
     {
-      // XXX
-      m_syncErrorCallback (packet->Copy (), snr);
+      m_syncErrorCallback (packet, snr);
     }
 }
 
--- a/src/devices/wifi/wifi-phy.h	Thu Jun 12 11:06:56 2008 -0700
+++ b/src/devices/wifi/wifi-phy.h	Thu Jun 12 11:14:54 2008 -0700
@@ -121,7 +121,7 @@
    * arg1: packet received unsuccessfully
    * arg2: snr of packet
    */
-  typedef Callback<void,Ptr<Packet>, double> SyncErrorCallback;
+  typedef Callback<void,Ptr<const Packet>, double> SyncErrorCallback;
 
   static TypeId GetTypeId (void);