From 7adc4d5fd45cd9c40fa57ef2299ca8cd8deaa8dd Mon Sep 17 00:00:00 2001 From: Angelo Athanassopoulos Date: Wed, 7 Sep 2022 14:28:04 +0200 Subject: [PATCH] NR RRC - Fix wrong index in used_drbs array --- openair2/RRC/NR/rrc_gNB_drbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/RRC/NR/rrc_gNB_drbs.c b/openair2/RRC/NR/rrc_gNB_drbs.c index 416865a1c5..701859f0fe 100644 --- a/openair2/RRC/NR/rrc_gNB_drbs.c +++ b/openair2/RRC/NR/rrc_gNB_drbs.c @@ -119,7 +119,7 @@ uint8_t next_available_drb(gNB_RRC_UE_t *ue, uint8_t pdusession_id, bool is_gbr) } else { /* Non-GBR Flow */ /* Find if Non-GBR DRB exists in the same PDU Session */ for (drb_id = 0; drb_id < NGAP_MAX_DRBS_PER_UE; drb_id++) - if(ue->pduSession[pdusession_id].param.used_drbs[drb_id-1] == DRB_ACTIVE_NONGBR) + if(ue->pduSession[pdusession_id].param.used_drbs[drb_id] == DRB_ACTIVE_NONGBR) return drb_id+1; /* If a Non-GBR DRB does not exist in the same PDU Session, find an available DRB */ for (drb_id = 0; drb_id < NGAP_MAX_DRBS_PER_UE; drb_id++)