From 65faee4e7be298ae29d6cc8aae4b8900f7d1d16f Mon Sep 17 00:00:00 2001 From: Craig Dowell Date: Fri, 13 Jul 2007 14:05:12 -0700 Subject: [PATCH] fix merge problem that lost candidate queue changes --- src/routing/static-route-manager.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/routing/static-route-manager.cc b/src/routing/static-route-manager.cc index 4eb432a09..3e8e43fd7 100644 --- a/src/routing/static-route-manager.cc +++ b/src/routing/static-route-manager.cc @@ -477,8 +477,7 @@ StaticRouteManager::SPFCalculate(Ipv4Address root) // tree (removing it from the candidate list in the // process). // Extract from the candidates the node with the lower key. - v = candidate.Top(); - candidate.Pop(); + v = candidate.Pop(); // Update stat field in vertex. NS_DEBUG("SPFCalculate: Popping vertex" << v->m_vertexId); v->m_lsa->m_stat = StaticRouterLSA::LSA_SPF_IN_SPFTREE; @@ -691,13 +690,14 @@ StaticRouteManagerTest::RunTests (void) for (int i = 0; i < 100; ++i) { - SPFVertex *v = candidate.Top (); - candidate.Pop (); + SPFVertex *v = candidate.Pop (); if (v->m_distanceFromRoot < lastDistance) { ok = false; } lastDistance = v->m_distanceFromRoot; + delete v; + v = 0; } // Build fake link state database; four routers (0-3), 3 point-to-point