From db729599d582baf0f160d3d09a6be6a6d6472013 Mon Sep 17 00:00:00 2001 From: Andrey Mazo Date: Thu, 12 Mar 2009 13:07:56 +0300 Subject: [PATCH] Sanitize MeshWifiMac::DoDispose(). Remove unneeded code from "mesh-wifi-helper.cc". --- src/devices/wifi/mesh-wifi-mac.cc | 11 +++++++---- src/helper/mesh-wifi-helper.cc | 3 +-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/devices/wifi/mesh-wifi-mac.cc b/src/devices/wifi/mesh-wifi-mac.cc index 4dd1d929b..eef1d6e3a 100644 --- a/src/devices/wifi/mesh-wifi-mac.cc +++ b/src/devices/wifi/mesh-wifi-mac.cc @@ -305,17 +305,20 @@ MeshWifiMac::SetBeaconInterval (Time interval) void MeshWifiMac::DoDispose (void) { + NS_LOG_FUNCTION (this); delete m_rxMiddle; delete m_dcfManager; //Delete smart pointers: - m_beaconSendEvent.Cancel (); - m_beaconFormEvent.Cancel (); + m_rxMiddle = 0; m_low = 0; + m_dcfManager = 0; + m_phy = 0; m_BE = 0; m_VO = 0; + m_peerManager = 0; + m_beaconSendEvent.Cancel (); + m_beaconFormEvent.Cancel (); m_beaconDca = 0; - m_phy = 0; - m_peerManager=0; WifiMac::DoDispose (); } diff --git a/src/helper/mesh-wifi-helper.cc b/src/helper/mesh-wifi-helper.cc index dc1ce52b9..f74c09c2e 100644 --- a/src/helper/mesh-wifi-helper.cc +++ b/src/helper/mesh-wifi-helper.cc @@ -180,7 +180,7 @@ MeshWifiHelper::Install (const WifiPhyHelper &phyHelper, NodeContainer c, uint8_ { Ptr node = *i; Ptr virtualDevice = m_deviceFactory.Create (); - PtrpPeer = m_peerManager.Create (); + Ptr pPeer = m_peerManager.Create (); devices.Add (virtualDevice); std::vector > nodeDevices; for (uint8_t k=0; kSetMac (mac); device->SetPhy (phy); device->SetRemoteStationManager (manager); - //mac ->SetPeerLinkManager (pPeer); //create L2RoutingNetDevice and add WifiNetDevice to it node->AddDevice(device); nodeDevices.push_back(device);