From 83de9cdb07bd3ffdf49d841989f99f1191d5d3c9 Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Fri, 24 Feb 2023 10:50:19 +0100 Subject: [PATCH] wifi: A WifiRemoteStation may not exist when GetMostRecentRssi is called, in case of MLDs --- src/wifi/model/wifi-remote-station-manager.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/wifi/model/wifi-remote-station-manager.cc b/src/wifi/model/wifi-remote-station-manager.cc index 3c680c69e..bc89e15d8 100644 --- a/src/wifi/model/wifi-remote-station-manager.cc +++ b/src/wifi/model/wifi-remote-station-manager.cc @@ -1341,9 +1341,7 @@ WifiRemoteStationManager::GetInfo(Mac48Address address) std::optional 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())