Fixed removing peer links
This commit is contained in:
1 parent
c61393236d
commit
cf2a72012d
4 files changed
+19
-10
No files matched your search
@@ -78,6 +78,18 @@ PeerLink::PeerLink ():
|
||||
m_retryCounter (0)
|
||||
{
|
||||
}
|
||||
PeerLink::~PeerLink ()
|
||||
{
|
||||
}
|
||||
void
|
||||
PeerLink::DoDispose ()
|
||||
{
|
||||
m_retryTimer.Cancel ();
|
||||
m_holdingTimer.Cancel ();
|
||||
m_confirmTimer.Cancel ();
|
||||
m_beaconLossTimer.Cancel ();
|
||||
m_beaconTiming.ClearTimingElement ();
|
||||
}
|
||||
void
|
||||
PeerLink::SetPeerAddress (Mac48Address macaddr)
|
||||
{
|
||||
@@ -154,11 +166,6 @@ PeerLink::GetBeaconTimingElement () const
|
||||
return m_beaconTiming;
|
||||
}
|
||||
void
|
||||
PeerLink::ClearTimingElement ()
|
||||
{
|
||||
m_beaconTiming.ClearTimingElement ();
|
||||
}
|
||||
void
|
||||
PeerLink::MLMECancelPeerLink (PmpReasonCode reason)
|
||||
{
|
||||
StateMachine (CNCL,reason);
|
||||
|
||||
@@ -45,6 +45,8 @@ public:
|
||||
static TypeId GetTypeId();
|
||||
/// C-tor create empty link
|
||||
PeerLink ();
|
||||
~PeerLink ();
|
||||
void DoDispose ();
|
||||
|
||||
/// Process beacon received from peer
|
||||
void SetBeaconInformation (Time lastBeacon, Time BeaconInterval);
|
||||
@@ -73,7 +75,6 @@ public:
|
||||
Time GetBeaconInterval () const;
|
||||
IeBeaconTiming GetBeaconTimingElement ()const;
|
||||
IePeerManagement GetPeerLinkDescriptorElement ()const;
|
||||
void ClearTimingElement ();
|
||||
//\}
|
||||
|
||||
/**
|
||||
|
||||
@@ -68,16 +68,17 @@ PeerManagementProtocol::PeerManagementProtocol ():
|
||||
{
|
||||
}
|
||||
PeerManagementProtocol::~PeerManagementProtocol ()
|
||||
{
|
||||
}
|
||||
void
|
||||
PeerManagementProtocol::DoDispose ()
|
||||
{
|
||||
//cancel cleanup event and go through the map of peer links,
|
||||
//deleting each
|
||||
for (PeerLinksMap::iterator j = m_peerLinks.begin (); j != m_peerLinks.end (); j++)
|
||||
{
|
||||
for (PeerLinksOnInterface::iterator i = j->second.begin (); i != j->second.end(); i++)
|
||||
{
|
||||
(*i)->ClearTimingElement ();
|
||||
(*i) = 0;
|
||||
}
|
||||
j->second.clear ();
|
||||
}
|
||||
m_peerLinks.clear ();
|
||||
@@ -312,7 +313,6 @@ PeerManagementProtocol::FindPeerLink(uint32_t interface, Mac48Address peerAddres
|
||||
{
|
||||
if((*i)->LinkIsIdle ())
|
||||
{
|
||||
(*i)->ClearTimingElement ();
|
||||
(*i) = 0;
|
||||
(iface->second).erase(i);
|
||||
return 0;
|
||||
|
||||
@@ -49,6 +49,7 @@ public:
|
||||
PeerManagementProtocol ();
|
||||
~PeerManagementProtocol ();
|
||||
static TypeId GetTypeId ();
|
||||
void DoDispose ();
|
||||
/**
|
||||
* \brief Install PMP on given mesh point.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user