do not call Unref directly anymore.
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Wed, 17 Oct 2007 17:01:51 +0200
changeset 1992 5ff1101cb843
parent 1991 6527b3e26b86
child 1993 e665fb7cea73
do not call Unref directly anymore.
src/devices/wifi/wifi-phy.cc
--- a/src/devices/wifi/wifi-phy.cc	Wed Oct 17 16:26:42 2007 +0200
+++ b/src/devices/wifi/wifi-phy.cc	Wed Oct 17 17:01:51 2007 +0200
@@ -88,7 +88,9 @@
       m_refCount (1)
   {}
   ~RxEvent ()
-  {}
+  {
+    NS_ASSERT (m_refCount == 0);
+  }
   
   void Ref (void) const {
     m_refCount++;
@@ -277,7 +279,6 @@
     break;
   }
 
-  event->Unref ();
   return;
 
  maybeCcaBusy:
@@ -311,7 +312,6 @@
         }
     }
 
-  event->Unref ();
 }
 void 
 WifiPhy::SendPacket (Packet const packet, WifiMode txMode, WifiPreamble preamble, uint8_t txPower)
@@ -1173,7 +1173,6 @@
       SwitchFromSync ();
       m_syncErrorCallback (packet, snr);
     }
-  event->Unref ();
 }