From 7d6cd9ae7cbefcb2a281bd51ffc11463343cafe1 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Fri, 14 Dec 2007 15:43:52 +0100 Subject: [PATCH] some debugging. Max rate test was inverted. --- src/devices/wifi/amrr-mac-stations.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/devices/wifi/amrr-mac-stations.cc b/src/devices/wifi/amrr-mac-stations.cc index 592e5b602..414c708f1 100644 --- a/src/devices/wifi/amrr-mac-stations.cc +++ b/src/devices/wifi/amrr-mac-stations.cc @@ -116,7 +116,8 @@ AmrrMacStation::IsMinRate (void) const bool AmrrMacStation::IsMaxRate (void) const { - return (m_txrate + 1 < GetNSupportedModes ()); + NS_ASSERT (m_txrate + 1 <= GetNSupportedModes ()); + return (m_txrate + 1 == GetNSupportedModes ()); } bool AmrrMacStation::IsSuccess (void) const @@ -160,12 +161,15 @@ AmrrMacStation::UpdateMode (void) return; } m_nextModeUpdate = Simulator::Now () + m_stations->m_updatePeriod; + NS_LOG_DEBUG ("Update"); bool needChange = false; if (IsSuccess () && IsEnough ()) { m_success++; + NS_LOG_DEBUG ("success="<