NR RRC - Fix wrong index in used_drbs array

This commit is contained in:
Angelo Athanassopoulos
2022-09-28 11:16:58 +02:00
parent d8a795dbd5
commit 7adc4d5fd4
+1 -1
View File
@@ -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++)