Commit a5bce40f authored by zhenghuangkun's avatar zhenghuangkun

modify x2ho cell expansion

parent eb3dfaf0
......@@ -116,8 +116,10 @@ void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
if (x2ap_enb_data_p != NULL) {
/* some sanity check - to be refined at some point */
if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
X2AP_ERROR("x2ap_enb_data_p not NULL and sctp state not SCTP_STATE_ESTABLISHED, what to do?\n");
abort();
//X2AP_ERROR("x2ap_enb_data_p not NULL and sctp state not SCTP_STATE_ESTABLISHED, what to do?\n");
//abort();
X2AP_ERROR("x2ap_enb_data_p not NULL and sctp state not SCTP_STATE_ESTABLISHED, remove x2ap instance\n");
x2ap_remove_eNB(instance_p,x2ap_enb_data_p);
}
x2ap_enb_data_p->in_streams = sctp_new_association_resp->in_streams;
......
......@@ -255,3 +255,17 @@ x2ap_eNB_data_t * x2ap_is_eNB_assoc_id_in_list (const uint32_t sctp_assoc_id)
}
return NULL;
}
void x2ap_remove_eNB(x2ap_eNB_instance_t *instance_p,x2ap_eNB_data_t *x2ap_enb_data_p) {
printf("x2ap_remove_eNB (removing)\n");
if (instance_p == NULL) {
STAILQ_FOREACH(instance_p, &x2ap_eNB_internal_data.x2ap_eNB_instances_head,
x2ap_eNB_entries) {
RB_REMOVE(x2ap_enb_map, &instance_p->x2ap_enb_head, x2ap_enb_data_p);
}
} else {
RB_REMOVE(x2ap_enb_map, &instance_p->x2ap_enb_head, x2ap_enb_data_p);
}
free(x2ap_enb_data_p);
}
......@@ -51,4 +51,6 @@ struct x2ap_eNB_data_s *x2ap_get_eNB(x2ap_eNB_instance_t *instance_p,
int32_t assoc_id,
uint16_t cnx_id);
void x2ap_remove_eNB(x2ap_eNB_instance_t *instance_p,x2ap_eNB_data_t *x2ap_enb_data_p);
#endif /* X2AP_ENB_MANAGEMENT_PROCEDURES_H_ */
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