lte: (fixes #885) Don't send RAR when UE context is not created
This commit is contained in:
@@ -526,6 +526,14 @@ LteEnbMac::DoSubframeIndication(uint32_t frameNo, uint32_t subframeNo)
|
||||
else
|
||||
{
|
||||
rnti = m_cmacSapUser->AllocateTemporaryCellRnti();
|
||||
|
||||
if (rnti == 0)
|
||||
{
|
||||
// If rnti = 0, UE context was not created (not enough SRS)
|
||||
// Therefore don't send RAR for this preamble
|
||||
NS_LOG_INFO("UE Context not created, no RAR is send");
|
||||
continue;
|
||||
}
|
||||
NS_LOG_INFO("preambleId " << (uint32_t)it->first << ": allocated T-C-RNTI "
|
||||
<< (uint32_t)rnti << ", sending RAR");
|
||||
}
|
||||
|
||||
@@ -3123,6 +3123,7 @@ LteEnbRrc::DoAllocateTemporaryCellRnti(uint8_t componentCarrierId)
|
||||
// if no SRS index is available, then do not create a new UE context.
|
||||
if (IsMaxSrsReached())
|
||||
{
|
||||
NS_LOG_WARN("Not enough SRS configuration index, UE context not created");
|
||||
return 0; // return 0 since new RNTI was not assigned for the received preamble
|
||||
}
|
||||
return AddUe(UeManager::INITIAL_RANDOM_ACCESS, componentCarrierId);
|
||||
|
||||
Reference in New Issue
Block a user