From 1bbd9675b6501edfed47deb1a4aa778ced4b8e70 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Tue, 13 Nov 2007 17:58:22 +0100 Subject: [PATCH] initialize more state variables --- src/devices/wifi/dcf-manager.cc | 6 ++++++ src/devices/wifi/dcf-manager.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/devices/wifi/dcf-manager.cc b/src/devices/wifi/dcf-manager.cc index d556c1385..815f209a7 100644 --- a/src/devices/wifi/dcf-manager.cc +++ b/src/devices/wifi/dcf-manager.cc @@ -16,6 +16,11 @@ namespace ns3 { * Implement the DCF state holder ****************************************************************/ +DcfState::DcfState () + : m_backoffSlots (0), + m_backoffStart (Seconds (0.0)) +{} + DcfState::~DcfState () {} @@ -30,6 +35,7 @@ DcfState::SetCwBounds (uint32_t minCw, uint32_t maxCw) { m_cwMin = minCw; m_cwMax = maxCw; + ResetCw (); } void diff --git a/src/devices/wifi/dcf-manager.h b/src/devices/wifi/dcf-manager.h index b9ee1fce3..f78b8580b 100644 --- a/src/devices/wifi/dcf-manager.h +++ b/src/devices/wifi/dcf-manager.h @@ -11,6 +11,8 @@ class MacParameters; class DcfState { public: + DcfState (); + virtual ~DcfState (); void SetAifsn (uint32_t aifsn);