Commit ae70afe4 authored by laurent's avatar laurent

fix for gcc version hat doesnt accept declarations in switch

parent 6a7a0104
......@@ -1567,17 +1567,17 @@ void *E1AP_CUCP_task(void *arg) {
&msg->ittiMsg.sctp_new_association_resp);
break;
case E1AP_SETUP_REQ:
case E1AP_SETUP_REQ: {
e1ap_setup_req_t *req = &E1AP_SETUP_REQ(msg);
char *ipaddr;
if (req->CUCP_e1_ip_address.ipv4 == 0) {
LOG_E(E1AP, "No IPv4 address configured\n");
return NULL;
}
else
} else {
ipaddr = req->CUCP_e1_ip_address.ipv4_address;
cucp_task_send_sctp_init_req(0, ipaddr);
break;
}
} break;
case SCTP_DATA_IND:
cuxp_task_handle_sctp_data_ind(myInstance, &msg->ittiMsg.sctp_data_ind);
......@@ -1620,12 +1620,12 @@ void *E1AP_CUUP_task(void *arg) {
const int msgType = ITTI_MSG_ID(msg);
LOG_I(E1AP, "CUUP received %s for instance %ld\n", messages_info[msgType].name, myInstance);
switch (msgType) {
case E1AP_SETUP_REQ:
case E1AP_SETUP_REQ: {
e1ap_setup_req_t *msgSetup = &E1AP_SETUP_REQ(msg);
createE1inst(UPtype, myInstance, msgSetup);
cuup_task_send_sctp_association_req(myInstance, msgSetup);
break;
} break;
case SCTP_NEW_ASSOCIATION_RESP:
cuup_task_handle_sctp_association_resp(myInstance, &msg->ittiMsg.sctp_new_association_resp);
......
......@@ -96,13 +96,6 @@ void du_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_dat
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
}
static instance_t du_create_gtpu_instance_to_cu(char *CUaddr, uint16_t CUport, char *DUaddr, uint16_t DUport) {
openAddr_t tmp= {0};
strncpy(tmp.originHost, DUaddr, sizeof(tmp.originHost)-1);
sprintf(tmp.originService, "%d", DUport);
return gtpv1Init(tmp);
}
void *F1AP_DU_task(void *arg) {
//sctp_cu_init();
LOG_I(F1AP, "Starting F1AP at DU\n");
......
......@@ -1078,7 +1078,7 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
static instance_t du_create_gtpu_instance_to_cu(char *CUaddr, uint16_t CUport, char *DUaddr, uint16_t DUport)
{
openAddr_t tmp;
openAddr_t tmp = {0};
strncpy(tmp.originHost, DUaddr, sizeof(tmp.originHost)-1);
strncpy(tmp.destinationHost, CUaddr, sizeof(tmp.destinationHost)-1);
sprintf(tmp.originService, "%d", DUport);
......
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