From 32ed7d9f3abd1ef3cac727085ac8425b8417cbc6 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Tue, 7 Aug 2018 09:40:52 +0200 Subject: [PATCH] print error when DRB couldn't be released --- srsue/src/upper/rrc.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/srsue/src/upper/rrc.cc b/srsue/src/upper/rrc.cc index f09442cbb..ecbfa0b04 100644 --- a/srsue/src/upper/rrc.cc +++ b/srsue/src/upper/rrc.cc @@ -2702,10 +2702,13 @@ void rrc::add_drb(LIBLTE_RRC_DRB_TO_ADD_MOD_STRUCT *drb_cnfg) { void rrc::release_drb(uint32_t drb_id) { uint32_t lcid = RB_ID_SRB2 + drb_id; - rrc_log->info("Releasing radio bearer %s\n", get_rb_name(lcid).c_str()); - drbs.erase(lcid); - // FIXME: add body + if (drbs.find(lcid) != drbs.end()) { + rrc_log->info("Releasing radio bearer %s\n", get_rb_name(lcid).c_str()); + drbs.erase(lcid); + } else { + rrc_log->error("Couldn't release radio bearer %s. Doesn't exist.\n", get_rb_name(lcid).c_str()); + } } void rrc::add_mrb(uint32_t lcid, uint32_t port)