Commit 21795b3b authored by Robert Schmidt's avatar Robert Schmidt

Correctly encode NRCGI in F1 UE Ctxt Modif Req

The two hardcoded PLMNs are never executed: they are in an if(0) block
parent 0be397b2
...@@ -957,9 +957,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context ...@@ -957,9 +957,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
F1AP_UEContextModificationRequest_t *out; F1AP_UEContextModificationRequest_t *out;
uint8_t *buffer=NULL; uint8_t *buffer=NULL;
uint32_t len=0; uint32_t len=0;
// for test
LOG_W(F1AP, "UE Context Modification Request PLMN is hardcoded!\n");
f1ap_served_cell_info_t hardCoded= { .plmn.mcc=208, .plmn.mnc=93, .plmn.mnc_digit_length=2};
/* Create */ /* Create */
/* 0. Message Type */ /* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
...@@ -985,13 +983,18 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context ...@@ -985,13 +983,18 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
/* optional */ /* optional */
/* c3. NRCGI */ /* c3. NRCGI */
if (0) { if (true) {
asn1cSequenceAdd(out->protocolIEs.list, F1AP_UEContextModificationRequestIEs_t, ie3); asn1cSequenceAdd(out->protocolIEs.list, F1AP_UEContextModificationRequestIEs_t, ie3);
ie3->id = F1AP_ProtocolIE_ID_id_SpCell_ID; ie3->id = F1AP_ProtocolIE_ID_id_SpCell_ID;
ie3->criticality = F1AP_Criticality_ignore; ie3->criticality = F1AP_Criticality_ignore;
ie3->value.present = F1AP_UEContextModificationRequestIEs__value_PR_NRCGI; ie3->value.present = F1AP_UEContextModificationRequestIEs__value_PR_NRCGI;
/* - nRCGI */ /* - nRCGI */
addnRCGI(ie3->value.choice.NRCGI, &hardCoded);
f1ap_served_cell_info_t nrcgi = {
.plmn = f1ap_ue_context_modification_req->plmn,
.nr_cellid = f1ap_ue_context_modification_req->nr_cellid,
};
addnRCGI(ie3->value.choice.NRCGI, &nrcgi);
} }
/* optional */ /* optional */
...@@ -1113,6 +1116,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context ...@@ -1113,6 +1116,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
F1AP_SCell_ToBeSetupMod_Item_t *scell_toBeSetupMod_item= F1AP_SCell_ToBeSetupMod_Item_t *scell_toBeSetupMod_item=
&scell_toBeSetupMod_item_ies->value.choice.SCell_ToBeSetupMod_Item; &scell_toBeSetupMod_item_ies->value.choice.SCell_ToBeSetupMod_Item;
// /* - sCell_ID */ // /* - sCell_ID */
f1ap_served_cell_info_t hardCoded = {0};
addnRCGI(scell_toBeSetupMod_item->sCell_ID, &hardCoded); addnRCGI(scell_toBeSetupMod_item->sCell_ID, &hardCoded);
/* sCellIndex */ /* sCellIndex */
scell_toBeSetupMod_item->sCellIndex = 6; // issue here scell_toBeSetupMod_item->sCellIndex = 6; // issue here
...@@ -1140,6 +1144,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context ...@@ -1140,6 +1144,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
F1AP_SCell_ToBeRemoved_Item_t *scell_toBeRemoved_item= F1AP_SCell_ToBeRemoved_Item_t *scell_toBeRemoved_item=
&scell_toBeRemoved_item_ies->value.choice.SCell_ToBeRemoved_Item; &scell_toBeRemoved_item_ies->value.choice.SCell_ToBeRemoved_Item;
/* - sCell_ID */ /* - sCell_ID */
f1ap_served_cell_info_t hardCoded = {0};
addnRCGI(scell_toBeRemoved_item->sCell_ID, &hardCoded); addnRCGI(scell_toBeRemoved_item->sCell_ID, &hardCoded);
} }
} }
......
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