diff --git a/src/internet-node/rtt-estimator.cc b/src/internet-node/rtt-estimator.cc index 728d85e7f..2a2594894 100644 --- a/src/internet-node/rtt-estimator.cc +++ b/src/internet-node/rtt-estimator.cc @@ -74,12 +74,9 @@ RttEstimator::RttEstimator () : next (1), history (), //note next=1 everywhere since first segment will have sequence 1 } -RttEstimator::RttEstimator (Time e) : next (1), history (), est (e), - nSamples (0), multiplier (1.0) -{ } - RttEstimator::RttEstimator(const RttEstimator& c) - : next(c.next), history(c.history), est(c.est), nSamples(c.nSamples), + : Object (c), next(c.next), history(c.history), + m_maxMultiplier (c.m_maxMultiplier), est(c.est), nSamples(c.nSamples), multiplier(c.multiplier) {} @@ -144,6 +141,10 @@ void RttEstimator::ClearSent () void RttEstimator::IncreaseMultiplier () { + double a; + a = multiplier * 2.0; + double b; + b = m_maxMultiplier * 2.0; multiplier = std::min (multiplier * 2.0, m_maxMultiplier); } @@ -223,7 +224,7 @@ Time RttMeanDeviation::RetransmitTimeout () Ptr RttMeanDeviation::Copy () const { - return Create (*this); + return CopyObject (this); } void RttMeanDeviation::Reset () diff --git a/src/internet-node/rtt-estimator.h b/src/internet-node/rtt-estimator.h index 84fea6c7e..9daf4584f 100644 --- a/src/internet-node/rtt-estimator.h +++ b/src/internet-node/rtt-estimator.h @@ -51,7 +51,6 @@ public: static TypeId GetTypeId (void); RttEstimator(); - RttEstimator(Time e); RttEstimator(const RttEstimator&); // Copy constructor virtual ~RttEstimator(); @@ -71,7 +70,6 @@ private: SequenceNumber next; // Next expected sequence to be sent RttHistory_t history; // List of sent packet double m_maxMultiplier; - Time m_initialEstimate; public: Time est; // Current estimate uint32_t nSamples;// Number of samples