mirror of https://github.com/PentHertz/srsLTE.git
srsenb,bugfix - avoid logging error message when UE sends CRNTI MAC CE for old rnti whose context has already been erased.
This commit is contained in:
parent
d175bb281b
commit
04ded030ea
|
@ -84,7 +84,7 @@ protected:
|
|||
bool is_generated(srsran::tti_point, uint32_t enb_cc_idx) const;
|
||||
// Helper methods
|
||||
template <typename Func>
|
||||
int ue_db_access_locked(uint16_t rnti, Func&& f, const char* func_name = nullptr);
|
||||
int ue_db_access_locked(uint16_t rnti, Func&& f, const char* func_name = nullptr, bool log_fail = true);
|
||||
|
||||
// args
|
||||
rrc_interface_mac* rrc = nullptr;
|
||||
|
|
|
@ -125,7 +125,8 @@ int sched::ue_rem(uint16_t rnti)
|
|||
|
||||
bool sched::ue_exists(uint16_t rnti)
|
||||
{
|
||||
return ue_db_access_locked(rnti, [](sched_ue& ue) {}) >= 0;
|
||||
return ue_db_access_locked(
|
||||
rnti, [](sched_ue& ue) {}, nullptr, false) >= 0;
|
||||
}
|
||||
|
||||
void sched::phy_config_enabled(uint16_t rnti, bool enabled)
|
||||
|
@ -351,17 +352,19 @@ bool sched::is_generated(srsran::tti_point tti_rx, uint32_t enb_cc_idx) const
|
|||
|
||||
// Common way to access ue_db elements in a read locking way
|
||||
template <typename Func>
|
||||
int sched::ue_db_access_locked(uint16_t rnti, Func&& f, const char* func_name)
|
||||
int sched::ue_db_access_locked(uint16_t rnti, Func&& f, const char* func_name, bool log_fail)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(sched_mutex);
|
||||
auto it = ue_db.find(rnti);
|
||||
if (it != ue_db.end()) {
|
||||
f(*it->second);
|
||||
} else {
|
||||
if (log_fail) {
|
||||
if (func_name != nullptr) {
|
||||
Error("User rnti=0x%x not found. Failed to call %s.", rnti, func_name);
|
||||
Error("SCHED: User rnti=0x%x not found. Failed to call %s.", rnti, func_name);
|
||||
} else {
|
||||
Error("User rnti=0x%x not found.", rnti);
|
||||
Error("SCHED: User rnti=0x%x not found.", rnti);
|
||||
}
|
||||
}
|
||||
return SRSRAN_ERROR;
|
||||
}
|
||||
|
|
|
@ -468,7 +468,11 @@ bool ue::process_ce(srsran::sch_subh* subh)
|
|||
rrc->upd_user(rnti, old_rnti);
|
||||
rnti = old_rnti;
|
||||
} else {
|
||||
logger.error("Updating user C-RNTI: rnti=0x%x already released", old_rnti);
|
||||
logger.warning("Updating user C-RNTI: rnti=0x%x already released.", old_rnti);
|
||||
// Disable scheduling for all bearers. The new rnti will be removed on msg3 timer expiry in the RRC
|
||||
for (uint32_t lcid = 0; lcid < sched_interface::MAX_LC; ++lcid) {
|
||||
sched->bearer_ue_rem(rnti, lcid);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case srsran::ul_sch_lcid::TRUNC_BSR:
|
||||
|
|
Loading…
Reference in New Issue