Use correct RRC UE ID for NSA UEs

The RRC UE context has the RRC UE ID. Use that instead of hardcoding
something that might be wrong (because the RRC UE ID can be reused,
whereas the counter just blindly increases).

The next commit will use that RRC UE ID to free the PDCP context for the
UE. It might be wrong on reattach otherwise, because the RRC UE ID could
again be 1.
This commit is contained in:
Robert Schmidt
2024-07-16 11:24:57 +02:00
parent 09675f6544
commit 3d2bf72efa
+1 -2
View File
@@ -344,8 +344,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context_p, x2a
// layers use different IDs (MAC/RLC use RNTI as DU UE ID, above use NGAP ID
// as CU UE ID.
uint32_t du_ue_id = ue_context_p->ue_context.rnti;
static uint32_t rrc_ue_id = 0;
rrc_ue_id++;
uint32_t rrc_ue_id = ue_context_p->ue_context.rrc_ue_id;
f1_ue_data_t du_ue_data = {.secondary_ue = rrc_ue_id};
du_add_f1_ue_data(du_ue_id, &du_ue_data);
f1_ue_data_t cu_ue_data = {.secondary_ue = du_ue_id};