NR RRC - Fix wrong index in used_drbs array

parent d8a795db
......@@ -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++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment