From 0dc5113b4a0b465853e2e54fa68b0f285bd7859e Mon Sep 17 00:00:00 2001 From: Tommaso Pecorella Date: Tue, 10 May 2011 00:07:19 +0200 Subject: [PATCH] bug 1133: fix DSDV GetSettlingTime --- src/dsdv/model/dsdv-routing-protocol.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dsdv/model/dsdv-routing-protocol.cc b/src/dsdv/model/dsdv-routing-protocol.cc index 01765ef7d..a93cde05a 100644 --- a/src/dsdv/model/dsdv-routing-protocol.cc +++ b/src/dsdv/model/dsdv-routing-protocol.cc @@ -1138,8 +1138,8 @@ RoutingProtocol::GetSettlingTime (Ipv4Address address) { NS_LOG_DEBUG ("Route SettlingTime: " << mainrt.GetSettlingTime ().GetSeconds () << " and LifeTime:" << mainrt.GetLifeTime ().GetSeconds ()); - weightedTime = Time ((m_weightedFactor * mainrt.GetSettlingTime () + 1.0 - m_weightedFactor) - * mainrt.GetLifeTime ()); + weightedTime = Time (m_weightedFactor * mainrt.GetSettlingTime ().GetSeconds() + (1.0 - m_weightedFactor) + * mainrt.GetLifeTime ().GetSeconds()); NS_LOG_DEBUG ("Calculated weightedTime:" << weightedTime.GetSeconds ()); return weightedTime; }