Fix OLSR agent finalization issues.

This commit is contained in:
Gustavo J. A. M. Carneiro
2007-10-13 14:21:27 +01:00
parent 315dfd2041
commit a18fc4fd93

View File

@@ -194,12 +194,21 @@ OlsrAgentImpl::OlsrAgentImpl (Ptr<Node> node)
void OlsrAgentImpl::DoDispose ()
{
m_ipv4 = 0;
m_receiveSocket->Dispose ();
m_receiveSocket = 0;
m_sendSocket->Dispose ();
m_sendSocket = 0;
m_routingTable->Dispose ();
m_routingTable = 0;
if (m_receiveSocket)
{
m_receiveSocket->Dispose ();
m_receiveSocket = 0;
}
if (m_sendSocket)
{
m_sendSocket->Dispose ();
m_sendSocket = 0;
}
if (m_routingTable)
{
m_routingTable->Dispose ();
m_routingTable = 0;
}
Object::DoDispose ();
}