wifi: A WifiRemoteStation may not exist when GetMostRecentRssi is called, in case of MLDs

This commit is contained in:
Stefano Avallone
2023-02-24 10:50:19 +01:00
committed by Stefano Avallone
parent 603ec8b51f
commit 83de9cdb07

View File

@@ -1341,9 +1341,7 @@ WifiRemoteStationManager::GetInfo(Mac48Address address)
std::optional<double>
WifiRemoteStationManager::GetMostRecentRssi(Mac48Address address) const
{
auto stationIt = m_stations.find(address);
NS_ASSERT_MSG(stationIt != m_stations.end(), "Address: " << address << " not found");
auto station = stationIt->second;
auto station = Lookup(address);
auto rssi = station->m_rssiAndUpdateTimePair.first;
auto ts = station->m_rssiAndUpdateTimePair.second;
if (ts.IsStrictlyPositive())