From d9f4c3072051e5d248ff3244aaebfb2f3851e39a Mon Sep 17 00:00:00 2001 From: Duy Nguyen Date: Mon, 21 Sep 2009 23:44:59 -0700 Subject: [PATCH] Fixed Minstrel rate potential seg fault due to calling UpdateStats before being initialized --- src/devices/wifi/minstrel-wifi-manager.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/wifi/minstrel-wifi-manager.cc b/src/devices/wifi/minstrel-wifi-manager.cc index 304a62a3a..944f9fd97 100644 --- a/src/devices/wifi/minstrel-wifi-manager.cc +++ b/src/devices/wifi/minstrel-wifi-manager.cc @@ -369,7 +369,6 @@ MinstrelWifiRemoteStation::GetManager (void) const WifiMode MinstrelWifiRemoteStation::DoGetDataMode (uint32_t size) { - UpdateStats (); if (!m_initialized) { CheckInit (); @@ -377,6 +376,7 @@ MinstrelWifiRemoteStation::DoGetDataMode (uint32_t size) /// start the rate at half way m_txrate = GetNSupportedModes () / 2; } + UpdateStats (); return GetSupportedMode (m_txrate); } @@ -435,7 +435,7 @@ MinstrelWifiRemoteStation::FindRate () { /// now go through the table and find an index rate - idx = GetNextSample (); + idx = GetNextSample(); /**