lte: End check before dereference and handle cell removals
This commit is contained in:
@@ -1495,7 +1495,8 @@ CqaFfMacScheduler::DoSchedDlTriggerReq(
|
||||
}
|
||||
|
||||
qos_rb_and_CQI_assigned_to_lc s;
|
||||
s.cqi_value_for_lc = UeToCQIValue.find(userWithMaximumMetric)->second;
|
||||
const auto ueToCqiIt = UeToCQIValue.find(userWithMaximumMetric);
|
||||
s.cqi_value_for_lc = ueToCqiIt != UeToCQIValue.end() ? ueToCqiIt->second : 1;
|
||||
s.resource_block_index = currentRB;
|
||||
|
||||
auto itMap = allocationMapPerRntiPerLCId.find(userWithMaximumMetric.m_rnti);
|
||||
|
||||
@@ -736,10 +736,10 @@ LteFfrEnhancedAlgorithm::DoReportDlCqiInfo(
|
||||
for (uint32_t j = 0; j < dlRbgAvailableMap.size(); j++)
|
||||
{
|
||||
uint32_t index = rbgSize * j;
|
||||
for (uint32_t i = 0; i < rbgSize; i++)
|
||||
for (uint32_t i = 0; i < rbgSize && index < m_ulBandwidth; i++)
|
||||
{
|
||||
index = index + i;
|
||||
ulRbAvailableMap[index] = dlRbgAvailableMap[j];
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2678,13 +2678,7 @@ LteUeRrc::CancelEnteringTrigger(uint8_t measId, uint16_t cellId)
|
||||
{
|
||||
NS_ASSERT(it2->measId == measId);
|
||||
|
||||
for (auto it3 = it2->concernedCells.begin(); it3 != it2->concernedCells.end(); ++it3)
|
||||
{
|
||||
if (*it3 == cellId)
|
||||
{
|
||||
it3 = it2->concernedCells.erase(it3);
|
||||
}
|
||||
}
|
||||
it2->concernedCells.remove_if([cellId](auto cell) { return cellId == cell; });
|
||||
|
||||
if (it2->concernedCells.empty())
|
||||
{
|
||||
@@ -2735,13 +2729,7 @@ LteUeRrc::CancelLeavingTrigger(uint8_t measId, uint16_t cellId)
|
||||
{
|
||||
NS_ASSERT(it2->measId == measId);
|
||||
|
||||
for (auto it3 = it2->concernedCells.begin(); it3 != it2->concernedCells.end(); ++it3)
|
||||
{
|
||||
if (*it3 == cellId)
|
||||
{
|
||||
it3 = it2->concernedCells.erase(it3);
|
||||
}
|
||||
}
|
||||
it2->concernedCells.remove_if([cellId](auto cell) { return cellId == cell; });
|
||||
|
||||
if (it2->concernedCells.empty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user