bugfix: unlocking RLC manager in nr_rlc_get_lcid_from_rb function

This commit is contained in:
francescomani
2024-11-13 14:25:01 +01:00
parent f54ca5714e
commit 4f884ab172
+7 -2
View File
@@ -114,14 +114,19 @@ logical_chan_id_t nr_rlc_get_lcid_from_rb(int ue_id, bool is_srb, int rb_id)
for (logical_chan_id_t id = 1; id <= 32; id++) {
nr_rlc_rb_t *rb = &ue->lcid2rb[id - 1];
if (is_srb) {
if (rb->type == NR_RLC_SRB && rb->choice.srb_id == rb_id)
if (rb->type == NR_RLC_SRB && rb->choice.srb_id == rb_id) {
nr_rlc_manager_unlock(nr_rlc_ue_manager);
return id;
}
} else {
if (rb->type == NR_RLC_DRB && rb->choice.drb_id == rb_id)
if (rb->type == NR_RLC_DRB && rb->choice.drb_id == rb_id) {
nr_rlc_manager_unlock(nr_rlc_ue_manager);
return id;
}
}
}
LOG_E(RLC, "Couldn't find LCID corresponding to %s %d\n", is_srb ? "SRB" : "DRB", rb_id);
nr_rlc_manager_unlock(nr_rlc_ue_manager);
return 0;
}