Commit 01a095a2 authored by Robert Schmidt's avatar Robert Schmidt

assoc_id only to be stored for DU

parent e9d91de5
...@@ -401,7 +401,9 @@ typedef struct f1ap_cudu_inst_s { ...@@ -401,7 +401,9 @@ typedef struct f1ap_cudu_inst_s {
f1ap_net_config_t net_config; f1ap_net_config_t net_config;
/* SCTP information */ /* SCTP information */
sctp_assoc_t assoc_id; struct {
sctp_assoc_t assoc_id;
} du;
uint16_t sctp_in_streams; uint16_t sctp_in_streams;
uint16_t sctp_out_streams; uint16_t sctp_out_streams;
......
...@@ -55,7 +55,8 @@ static void cu_task_handle_sctp_association_ind(instance_t instance, ...@@ -55,7 +55,8 @@ static void cu_task_handle_sctp_association_ind(instance_t instance,
{ {
// save the assoc id // save the assoc id
f1ap_cudu_inst_t *f1ap_cu_data = getCxt(instance); f1ap_cudu_inst_t *f1ap_cu_data = getCxt(instance);
f1ap_cu_data->assoc_id = sctp_new_association_ind->assoc_id; // we don't need the assoc_id, subsequent messages (the first being F1 Setup
// Request), will deliver the assoc_id
f1ap_cu_data->sctp_in_streams = sctp_new_association_ind->in_streams; f1ap_cu_data->sctp_in_streams = sctp_new_association_ind->in_streams;
f1ap_cu_data->sctp_out_streams = sctp_new_association_ind->out_streams; f1ap_cu_data->sctp_out_streams = sctp_new_association_ind->out_streams;
} }
......
...@@ -76,11 +76,11 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat ...@@ -76,11 +76,11 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
} }
// save the assoc id // save the assoc id
f1ap_du_data->assoc_id = sctp_new_association_resp->assoc_id; f1ap_du_data->du.assoc_id = sctp_new_association_resp->assoc_id;
f1ap_du_data->sctp_in_streams = sctp_new_association_resp->in_streams; f1ap_du_data->sctp_in_streams = sctp_new_association_resp->in_streams;
f1ap_du_data->sctp_out_streams = sctp_new_association_resp->out_streams; f1ap_du_data->sctp_out_streams = sctp_new_association_resp->out_streams;
/* setup parameters for F1U and start the server */ /* setup parameters for F1U and start the server */
DU_send_F1_SETUP_REQUEST(f1ap_du_data->assoc_id, &f1ap_du_data->setupReq); DU_send_F1_SETUP_REQUEST(f1ap_du_data->du.assoc_id, &f1ap_du_data->setupReq);
} }
void du_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind) { void du_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind) {
...@@ -102,7 +102,7 @@ void *F1AP_DU_task(void *arg) { ...@@ -102,7 +102,7 @@ void *F1AP_DU_task(void *arg) {
MessageDef *msg = NULL; MessageDef *msg = NULL;
itti_receive_msg(TASK_DU_F1, &msg); itti_receive_msg(TASK_DU_F1, &msg);
instance_t myInstance=ITTI_MSG_DESTINATION_INSTANCE(msg); instance_t myInstance=ITTI_MSG_DESTINATION_INSTANCE(msg);
sctp_assoc_t assoc_id = getCxt(0) != NULL ? getCxt(0)->assoc_id : 0; sctp_assoc_t assoc_id = getCxt(0) != NULL ? getCxt(0)->du.assoc_id : 0;
LOG_D(F1AP, "DU Task Received %s for instance %ld: sending SCTP messages via assoc_id %d\n", ITTI_MSG_NAME(msg), myInstance, assoc_id); LOG_D(F1AP, "DU Task Received %s for instance %ld: sending SCTP messages via assoc_id %d\n", ITTI_MSG_NAME(msg), myInstance, assoc_id);
switch (ITTI_MSG_ID(msg)) { switch (ITTI_MSG_ID(msg)) {
case F1AP_SETUP_REQ: case F1AP_SETUP_REQ:
......
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