Commit b1d1d4c8 authored by Robert Schmidt's avatar Robert Schmidt

X2AP configuration: Use more idiomatic AssertFatal than if

parent b485310e
...@@ -2515,10 +2515,9 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) ...@@ -2515,10 +2515,9 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i)
config_getlist( &X2ParamList,X2Params,sizeof(X2Params)/sizeof(paramdef_t),aprefix); config_getlist( &X2ParamList,X2Params,sizeof(X2Params)/sizeof(paramdef_t),aprefix);
if(X2ParamList.numelt>X2AP_MAX_NB_ENB_IP_ADDRESS){ AssertFatal(X2ParamList.numelt <= X2AP_MAX_NB_ENB_IP_ADDRESS,
LOG_E(RRC,"value of X2ParamList.numelt %d must be lower than X2AP_MAX_NB_ENB_IP_ADDRESS %d value: reconsider to increase X2AP_MAX_NB_ENB_IP_ADDRESS\n",X2ParamList.numelt,X2AP_MAX_NB_ENB_IP_ADDRESS); "value of X2ParamList.numelt %d must be lower than X2AP_MAX_NB_ENB_IP_ADDRESS %d value: reconsider to increase X2AP_MAX_NB_ENB_IP_ADDRESS\n",
exit(1); X2ParamList.numelt,X2AP_MAX_NB_ENB_IP_ADDRESS);
}
X2AP_REGISTER_ENB_REQ (msg_p).nb_x2 = 0; X2AP_REGISTER_ENB_REQ (msg_p).nb_x2 = 0;
for (l = 0; l < X2ParamList.numelt; l++) { for (l = 0; l < X2ParamList.numelt; l++) {
...@@ -2554,10 +2553,8 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) ...@@ -2554,10 +2553,8 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i)
X2AP_REGISTER_ENB_REQ (msg_p).enb_port_for_X2C = (uint32_t)*(NETParams[ENB_PORT_FOR_X2C_IDX].uptr); X2AP_REGISTER_ENB_REQ (msg_p).enb_port_for_X2C = (uint32_t)*(NETParams[ENB_PORT_FOR_X2C_IDX].uptr);
if ((NETParams[ENB_IPV4_ADDR_FOR_X2C_IDX].strptr == NULL) || (X2AP_REGISTER_ENB_REQ (msg_p).enb_port_for_X2C == 0)) { AssertFatal(NETParams[ENB_IPV4_ADDR_FOR_X2C_IDX].strptr != NULL && X2AP_REGISTER_ENB_REQ (msg_p).enb_port_for_X2C > 0,
LOG_E(RRC,"Add eNB IPv4 address and/or port for X2C in the CONF file!\n"); "Add eNB IPv4 address and/or port for X2C in the CONF file!\n");
exit(1);
}
cidr = *(NETParams[ENB_IPV4_ADDR_FOR_X2C_IDX].strptr); cidr = *(NETParams[ENB_IPV4_ADDR_FOR_X2C_IDX].strptr);
address = strtok(cidr, "/"); address = strtok(cidr, "/");
......
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