bug 1133: fix DSDV GetSettlingTime
authorTommaso Pecorella
Tue, 10 May 2011 00:07:19 +0200
changeset 7144 9c60c34c6527
parent 7143 0146b1916bc0
child 7145 a925e518220b
bug 1133: fix DSDV GetSettlingTime
src/dsdv/model/dsdv-routing-protocol.cc
--- a/src/dsdv/model/dsdv-routing-protocol.cc	Mon May 09 22:03:43 2011 +0200
+++ b/src/dsdv/model/dsdv-routing-protocol.cc	Tue May 10 00:07:19 2011 +0200
@@ -1138,8 +1138,8 @@
         {
           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;
         }