wifi: Get rid of "NS_ASSERT_MSG (false, ..."

Replaced with NS_FATAL_ERROR or proper NS_ASSERT_MSG
This commit is contained in:
Alexander Krotov
2018-07-20 18:06:34 +03:00
parent 93ce5ba2f7
commit f5f26c6b43
3 changed files with 9 additions and 9 deletions

View File

@@ -1592,7 +1592,7 @@ ApWifiMac::GetNextAssociationId (void)
return nextAid;
}
}
NS_ASSERT_MSG (false, "No free association ID available!");
NS_FATAL_ERROR ("No free association ID available!");
return 0;
}

View File

@@ -655,7 +655,7 @@ MinstrelHtWifiManager::DoReportAmpduTxStatus (WifiRemoteStation *st, uint8_t nSu
if (!station->m_isHt)
{
NS_ASSERT_MSG (false,"A-MPDU Tx Status called but no HT or VHT supported.");
NS_FATAL_ERROR ("A-MPDU Tx Status called but no HT or VHT supported.");
}
NS_LOG_DEBUG ("DoReportAmpduTxStatus. TxRate=" << station->m_txrate << " SuccMpdus= " <<
@@ -766,7 +766,7 @@ MinstrelHtWifiManager::UpdateRate (MinstrelHtWifiRemoteStation *station)
}
else
{
NS_ASSERT_MSG (false,"Max retries reached and m_longRetry not cleared properly. longRetry= " << station->m_longRetry);
NS_FATAL_ERROR ("Max retries reached and m_longRetry not cleared properly. longRetry= " << station->m_longRetry);
}
}
@@ -790,7 +790,7 @@ MinstrelHtWifiManager::UpdateRate (MinstrelHtWifiRemoteStation *station)
}
else
{
NS_ASSERT_MSG (false,"Max retries reached and m_longRetry not cleared properly. longRetry= " << station->m_longRetry);
NS_FATAL_ERROR ("Max retries reached and m_longRetry not cleared properly. longRetry= " << station->m_longRetry);
}
}
NS_LOG_DEBUG ("Next rate to use TxRate = " << station->m_txrate);
@@ -865,7 +865,7 @@ MinstrelHtWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
// Check consistency of rate selected.
if ((group.sgi && !GetShortGuardInterval (station)) || group.chWidth > GetChannelWidth (station) || group.streams > GetNumberOfSupportedStreams (station))
{
NS_ASSERT_MSG (false, "Inconsistent group selected. Group: (" << +group.streams <<
NS_FATAL_ERROR ("Inconsistent group selected. Group: (" << +group.streams <<
"," << +group.sgi << "," << group.chWidth << ")" <<
" Station capabilities: (" << GetNumberOfSupportedStreams (station) <<
"," << GetShortGuardInterval (station) << "," << GetChannelWidth (station) << ")");

View File

@@ -97,10 +97,10 @@ void
SupportedRates::AddBssMembershipSelectorRate (uint64_t bs)
{
NS_LOG_FUNCTION (this << bs);
if ((bs != BSS_MEMBERSHIP_SELECTOR_HT_PHY) && (bs != BSS_MEMBERSHIP_SELECTOR_VHT_PHY) && (bs != BSS_MEMBERSHIP_SELECTOR_HE_PHY))
{
NS_ASSERT_MSG (false, "Value " << bs << " not a BSS Membership Selector");
}
NS_ASSERT_MSG (bs == BSS_MEMBERSHIP_SELECTOR_HT_PHY ||
bs == BSS_MEMBERSHIP_SELECTOR_VHT_PHY ||
bs == BSS_MEMBERSHIP_SELECTOR_HE_PHY,
"Value " << bs << " not a BSS Membership Selector");
uint8_t rate = static_cast<uint8_t> (bs / 500000);
for (uint8_t i = 0; i < m_nRates; i++)
{