Commit e4ec620e authored by Laurent THOMAS's avatar Laurent THOMAS

fix a regression I made

parent 7fcd5e3e
......@@ -345,13 +345,13 @@ endif ()
add_definitions("-DASN_DISABLE_OER_SUPPORT")
#########################
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CURRENT_BINARY_DIR}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ggdb3 -Wl,-rpath -Wl,${CMAKE_CURRENT_BINARY_DIR}")
#########################
# set a flag for changes in the source code
# these changes are related to hardcoded path to include .h files
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g3 -Og -DMALLOC_CHECK_=3")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g3 -DMALLOC_CHECK_=3 -O2 -fno-delete-null-pointer-checks")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -ggdb3 -Og -DMALLOC_CHECK_=3")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -ggdb3 -DMALLOC_CHECK_=3 -O2 -fno-delete-null-pointer-checks")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3")
set(GIT_BRANCH "UNKNOWN")
set(GIT_COMMIT_HASH "UNKNOWN")
......
......@@ -300,16 +300,14 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
/* mandatory */
/* c5. RRC VERSION */
if(RC.nrrrc) {
asn1cSequenceAdd(f1Setup->protocolIEs.list, F1AP_F1SetupRequestIEs_t, ie2);
ie2->id = F1AP_ProtocolIE_ID_id_GNB_DU_RRC_Version;
ie2->criticality = F1AP_Criticality_reject;
ie2->value.present = F1AP_F1SetupRequestIEs__value_PR_RRC_Version;
ie2->value.choice.RRC_Version.latest_RRC_Version.buf=calloc(1,sizeof(char));
ie2->value.choice.RRC_Version.latest_RRC_Version.buf[0] = 0xe0;
ie2->value.choice.RRC_Version.latest_RRC_Version.size = 1;
ie2->value.choice.RRC_Version.latest_RRC_Version.bits_unused = 5;
}
asn1cSequenceAdd(f1Setup->protocolIEs.list, F1AP_F1SetupRequestIEs_t, ie2);
ie2->id = F1AP_ProtocolIE_ID_id_GNB_DU_RRC_Version;
ie2->criticality = F1AP_Criticality_reject;
ie2->value.present = F1AP_F1SetupRequestIEs__value_PR_RRC_Version;
ie2->value.choice.RRC_Version.latest_RRC_Version.buf=calloc(1,sizeof(char));
ie2->value.choice.RRC_Version.latest_RRC_Version.buf[0] = 0xe0;
ie2->value.choice.RRC_Version.latest_RRC_Version.size = 1;
ie2->value.choice.RRC_Version.latest_RRC_Version.bits_unused = 5;
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
......@@ -474,6 +472,7 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
} // for IE
AssertFatal(TransactionId!=-1,"TransactionId was not sent\n");
LOG_D(F1AP,"F1AP: num_cells_to_activate %d\n",num_cells_to_activate);
F1AP_SETUP_RESP (msg_p).num_cells_to_activate = num_cells_to_activate;
// tmp
......@@ -481,10 +480,19 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
for (int i=0; i<num_cells_to_activate; i++)
AssertFatal(F1AP_SETUP_RESP (msg_p).cells_to_activate[i].num_SI > 0, "System Information %d is missing",i);
MSC_LOG_RX_MESSAGE(
MSC_F1AP_DU,
MSC_F1AP_CU,
0,
0,
MSC_AS_TIME_FMT" DU_handle_F1_SETUP_RESPONSE successfulOutcome assoc_id %d",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
assoc_id);
LOG_D(F1AP, "Sending F1AP_SETUP_RESP ITTI message\n");
itti_send_msg_to_task(TASK_F1APP, GNB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p);
return 0;
}
// SETUP FAILURE
int DU_handle_F1_SETUP_FAILURE(instance_t instance,
uint32_t assoc_id,
......@@ -509,9 +517,12 @@ int DU_handle_F1_SETUP_FAILURE(instance_t instance,
return 0;
}
/*
gNB-DU Configuration Update
*/
//void DU_send_gNB_DU_CONFIGURATION_UPDATE(F1AP_GNBDUConfigurationUpdate_t *GNBDUConfigurationUpdate) {
int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
instance_t du_mod_idP,
......@@ -749,14 +760,16 @@ int DU_handle_gNB_DU_CONFIGURATION_FAILURE(instance_t instance,
F1AP_F1AP_PDU_t *pdu) {
AssertFatal(1==0,"Not implemented yet\n");
}
int DU_handle_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu) {
AssertFatal(1==0,"Not implemented yet\n");
}
int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance,
int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu) {
......@@ -894,6 +907,14 @@ int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance,
AssertFatal(TransactionId!=-1,"TransactionId was not sent\n");
LOG_D(F1AP,"F1AP: num_cells_to_activate %d\n",num_cells_to_activate);
F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).num_cells_to_activate = num_cells_to_activate;
MSC_LOG_RX_MESSAGE(
MSC_F1AP_DU,
MSC_F1AP_CU,
0,
0,
MSC_AS_TIME_FMT" DU_handle_GNB_CU_CONFIGURATION_UPDATE initiatingMessage assoc_id %d",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
assoc_id);
LOG_D(F1AP, "Sending F1AP_GNB_CU_CONFIGURATION_UPDATE ITTI message \n");
itti_send_msg_to_task(TASK_F1APP, GNB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p);
return 0;
......@@ -904,6 +925,7 @@ int DU_send_gNB_CU_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
AssertFatal(1==0,"received gNB CU CONFIGURATION UPDATE FAILURE with cause %d\n",
GNBCUConfigurationUpdateFailure->cause);
}
int DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
f1ap_gnb_cu_configuration_update_acknowledge_t *GNBCUConfigurationUpdateAcknowledge) {
AssertFatal(GNBCUConfigurationUpdateAcknowledge->num_cells_failed_to_be_activated == 0,
......@@ -947,10 +969,13 @@ int DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
f1ap_itti_send_sctp_data_req(false, instance, buffer, len, 0);
return 0;
}
int DU_send_gNB_DU_RESOURCE_COORDINATION_REQUEST(instance_t instance,
F1AP_GNBDUResourceCoordinationRequest_t *GNBDUResourceCoordinationRequest) {
AssertFatal(0, "Not implemented yet\n");
}
int DU_handle_gNB_DU_RESOURCE_COORDINATION_RESPONSE(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
......
......@@ -91,8 +91,9 @@ int f1ap_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream,
}
/* Checking procedure Code and direction of message */
if (pdu.choice.initiatingMessage->procedureCode >= sizeof(f1ap_message_processing_t) / (3 * sizeof(
f1ap_message_processing_t))
if (pdu.choice.initiatingMessage->procedureCode >=
sizeof(f1ap_messages_processing) /
(3 * sizeof(f1ap_message_processing_t))
|| (pdu.present > F1AP_F1AP_PDU_PR_unsuccessfulOutcome)) {
LOG_E(F1AP, "[SCTP %d] Either procedureCode %ld or direction %d exceed expected\n",
assoc_id, pdu.choice.initiatingMessage->procedureCode, pdu.present);
......
......@@ -82,7 +82,6 @@ extern int asn1_xer_print;
# define S1AP_INFO(x, args...) LOG_I(S1AP, x, ##args)
# define S1AP_DEBUG(x, args...) LOG_I(S1AP, x, ##args)
#else
# include "mme_default_values.h"
# define S1AP_ERROR(x, args...) do { fprintf(stdout, "[S1AP][E]"x, ##args); } while(0)
# define S1AP_WARN(x, args...) do { fprintf(stdout, "[S1AP][W]"x, ##args); } while(0)
# define S1AP_TRAF(x, args...) do { fprintf(stdout, "[S1AP][T]"x, ##args); } while(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