Commit 7e1607bc authored by Panos Matzakos's avatar Panos Matzakos

ENDC X2AP: Small modification at generation of SgNB Addition Request.

parent 50509dfc
......@@ -347,10 +347,6 @@ if (fd != NULL) {
}
///---------------------------------------------------------------------------------------------------------------///
///---------------------------------------------------------------------------------------------------------------///
......@@ -452,6 +448,13 @@ void *rrc_gnb_task(void *args_p) {
rrc_gNB_process_AdditionRequestInformation(GNB_INSTANCE_TO_MODULE_ID(instance), &X2AP_ENDC_SGNB_ADDITION_REQ(msg_p));
break;
/* Messages from X2AP */
case X2AP_ENDC_SGNB_ADDITION_REQ:
LOG_I(NR_RRC, "Received ENDC sgNB addition request from X2AP \n");
rrc_gNB_process_AdditionRequestInformation(GNB_INSTANCE_TO_MODULE_ID(instance), &X2AP_ENDC_SGNB_ADDITION_REQ(msg_p));
break;
default:
LOG_E(NR_RRC, "[gNB %d] Received unexpected message %s\n", instance, msg_name_p);
break;
......
......@@ -1538,6 +1538,7 @@ int x2ap_eNB_generate_ENDC_x2_SgNB_addition_request(
CG_Config_Info.size = 4096;
CG_Config_Info.buf = (uint8_t *)calloc(4096, sizeof(uint8_t));
int msg_len=fread(CG_Config_Info.buf,1,CG_Config_Info.size,fd);
CG_Config_Info.size = msg_len;
/*char buffer[4096];
int msg_len=fread(buffer,1,4096,fd);*/
......@@ -1647,9 +1648,9 @@ int x2ap_eNB_generate_ENDC_x2_SgNB_addition_request(
ie->id = X2AP_ProtocolIE_ID_id_MeNBtoSgNBContainer;
ie->criticality = X2AP_Criticality_reject;
ie->value.present = X2AP_SgNBAdditionRequest_IEs__value_PR_MeNBtoSgNBContainer;
ie->value.choice.MeNBtoSgNBContainer.buf = (uint8_t *)calloc(4096, sizeof(uint8_t));
ie->value.choice.MeNBtoSgNBContainer.buf = (uint8_t *)calloc(CG_Config_Info.size, sizeof(uint8_t));
memcpy(ie->value.choice.MeNBtoSgNBContainer.buf, CG_Config_Info.buf, CG_Config_Info.size);
ie->value.choice.MeNBtoSgNBContainer.size = 4096;
ie->value.choice.MeNBtoSgNBContainer.size = CG_Config_Info.size; //4096;
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
if (x2ap_eNB_encode_pdu(&pdu, &buffer, &len) < 0) {
......
......@@ -1767,7 +1767,6 @@ int x2ap_gNB_handle_ENDC_sGNB_addition_request (instance_t instance,
memcpy(X2AP_ENDC_SGNB_ADDITION_REQ(msg).rrc_buffer, ie->value.choice.MeNBtoSgNBContainer.buf, ie->value.choice.MeNBtoSgNBContainer.size);
X2AP_ENDC_SGNB_ADDITION_REQ(msg).rrc_buffer_size = ie->value.choice.MeNBtoSgNBContainer.size;
itti_send_msg_to_task(TASK_RRC_GNB, instance_p->instance, msg);
return 0;
......
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