stack,rrc: fix double removal of EPS bearer

The EPS bearer was removed twice, causing an error in the logs.

Fix issue #3380

Signed-off-by: Carlo Galiotto <carlo@srs.io>
master
Carlo Galiotto 3 years ago committed by carlo-gal
parent d30239f47b
commit 43a7d822fa

@ -51,7 +51,7 @@ public:
radio_bearer_t get_radio_bearer(uint32_t eps_bearer_id); radio_bearer_t get_radio_bearer(uint32_t eps_bearer_id);
radio_bearer_t get_lcid_bearer(uint32_t lcid); radio_bearer_t get_eps_bearer_id_for_lcid(uint32_t lcid);
private: private:
using eps_rb_map_t = std::map<uint32_t, radio_bearer_t>; using eps_rb_map_t = std::map<uint32_t, radio_bearer_t>;
@ -119,7 +119,7 @@ public:
radio_bearer_t get_lcid_bearer(uint32_t lcid) radio_bearer_t get_lcid_bearer(uint32_t lcid)
{ {
srsran::rwlock_read_guard rw_lock(rwlock); srsran::rwlock_read_guard rw_lock(rwlock);
return impl.get_lcid_bearer(lcid); return impl.get_eps_bearer_id_for_lcid(lcid);
} }
private: private:

@ -58,7 +58,7 @@ ue_bearer_manager_impl::radio_bearer_t ue_bearer_manager_impl::get_radio_bearer(
return it != bearers.end() ? it->second : invalid_rb; return it != bearers.end() ? it->second : invalid_rb;
} }
ue_bearer_manager_impl::radio_bearer_t ue_bearer_manager_impl::get_lcid_bearer(uint32_t lcid) ue_bearer_manager_impl::radio_bearer_t ue_bearer_manager_impl::get_eps_bearer_id_for_lcid(uint32_t lcid)
{ {
auto lcid_it = lcid_to_eps_bearer_id.find(lcid); auto lcid_it = lcid_to_eps_bearer_id.find(lcid);
return lcid_it != lcid_to_eps_bearer_id.end() ? bearers.at(lcid_it->second) : invalid_rb; return lcid_it != lcid_to_eps_bearer_id.end() ? bearers.at(lcid_it->second) : invalid_rb;
@ -179,7 +179,7 @@ enb_bearer_manager::radio_bearer_t enb_bearer_manager::get_lcid_bearer(uint16_t
if (user_it == users_map.end()) { if (user_it == users_map.end()) {
return srsran::detail::ue_bearer_manager_impl::invalid_rb; return srsran::detail::ue_bearer_manager_impl::invalid_rb;
} }
return user_it->second.get_lcid_bearer(lcid); return user_it->second.get_eps_bearer_id_for_lcid(lcid);
} }
enb_bearer_manager::radio_bearer_t enb_bearer_manager::get_radio_bearer(uint16_t rnti, uint32_t eps_bearer_id) enb_bearer_manager::radio_bearer_t enb_bearer_manager::get_radio_bearer(uint16_t rnti, uint32_t eps_bearer_id)

@ -280,9 +280,6 @@ void rrc::ue::rrc_endc::handle_sgnb_add_req_ack(wait_sgnb_add_req_resp_st& s, co
// TODO: path update procedure with GTPU modify bearer request (for mode 3A and 3X) // TODO: path update procedure with GTPU modify bearer request (for mode 3A and 3X)
// delete EPS bearer mapping over EUTRA PDCP
rrc_enb->bearer_manager.remove_eps_bearer(rrc_ue->rnti, ev.params.eps_bearer_id);
// re-register EPS bearer over NR PDCP // re-register EPS bearer over NR PDCP
rrc_enb->bearer_manager.add_eps_bearer( rrc_enb->bearer_manager.add_eps_bearer(
ev.params.nr_rnti, ev.params.eps_bearer_id, srsran::srsran_rat_t::nr, lcid_drb_nr); ev.params.nr_rnti, ev.params.eps_bearer_id, srsran::srsran_rat_t::nr, lcid_drb_nr);

Loading…
Cancel
Save