* eNB has been fount in list, consider the s1 setup request as a reset connection,
* eNB has been fount in list, consider the s1 setup request as a reset connection,
* * * * reseting any previous UE state if sctp association is != than the previous one
* * * * reseting any previous UE state if sctp association is != than the previous one
*/
*/
if(eNB_association->sctp_assoc_id!=assoc_id){
if(x2ap_eNB_data->assoc_id!=assoc_id){
X2SetupFailureIEs_tx2SetupFailure;
X2SetupFailure_IEs_tx2SetupFailure;
memset(&x2SetupFailure,0,sizeof(x2SetupFailure));
memset(&x2SetupFailure,0,sizeof(x2SetupFailure));
/*
/*
* Send an overload cause...
* Send an overload cause...
*/
*/
s1SetupFailure.cause.present=X2ap_Cause_PR_misc;//TODO: send the right cause
X2AP_ERROR("Rejeting x2 setup request as eNB id %d is already associated to an active sctp association""Previous known: %d, new one: %d\n",eNB_id,x2ap_eNB_data->assoc_id,assoc_id);
X2AP_ERROR("Rejeting x2 setup request as eNB id %d is already associated to an active sctp association""Previous known: %d, new one: %d\n",eNB_id,eNB_association->sctp_assoc_id,assoc_id);