src/routing/aodv/aodv-rtable.cc
changeset 5652 5236285e3818
parent 5651 26deb6597b42
child 5653 3fa3f186e045
--- a/src/routing/aodv/aodv-rtable.cc	Thu Aug 06 20:05:18 2009 +0400
+++ b/src/routing/aodv/aodv-rtable.cc	Thu Aug 06 20:43:17 2009 +0400
@@ -306,6 +306,7 @@
 bool
 RoutingTable::SetEntryState (Ipv4Address id, RouteFlags state )
 {
+  Purge ();
   std::map<Ipv4Address, RoutingTableEntry>::iterator i = m_ipv4AddressEntry.find (id);
   if (i == m_ipv4AddressEntry.end ())
     return false;
@@ -373,6 +374,7 @@
 bool
 RoutingTable::MarkLinkAsUinidirectional (Ipv4Address neighbor, Time blacklistTimeout )
 {
+  Purge ();
   std::map<Ipv4Address, RoutingTableEntry>::iterator i = m_ipv4AddressEntry.find (neighbor);
   if (i == m_ipv4AddressEntry.end ())
     return false;
@@ -383,8 +385,9 @@
 }
 
 void
-RoutingTable::Print (std::ostream &os ) const
+RoutingTable::Print (std::ostream &os )
 {
+  Purge ();
   os << "\nAODV Routing table\n" << "Destination\tGateway\t\tInterface\tFlag\tExpire\n";
   for (std::map<Ipv4Address, RoutingTableEntry>::const_iterator i = m_ipv4AddressEntry.begin (); i != m_ipv4AddressEntry.end (); ++i)
     {