Commit c63abcd0 authored by Cedric Roux's avatar Cedric Roux

nsa: x2ap: hack: exit gNB if connection to eNB failed

Exit gNB if connection to eNB failed - to be modified if needed.

We may want to try to connect over and over again until we succeed
but the modifications to the code to get this behavior are complex.

Exit on error is a simple solution.
parent 875e2906
......@@ -130,6 +130,18 @@ void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
DevAssert(x2ap_enb_data_p != NULL);
dump_trees();
/* gNB: exit if connection to eNB failed - to be modified if needed.
* We may want to try to connect over and over again until we succeed
* but the modifications to the code to get this behavior are complex.
* Exit on error is a simple solution that can be caught by a script
* for example.
*/
if (instance_p->cell_type == CELL_MACRO_GNB
&& sctp_new_association_resp->sctp_state == SCTP_STATE_UNREACHABLE) {
X2AP_ERROR("association with eNB failed, is it running? If no, run it first. If yes, check IP addresses in your configuration file.\n");
exit(1);
}
if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
X2AP_WARN("Received unsuccessful result for SCTP association (%u), instance %ld, cnx_id %u\n",
sctp_new_association_resp->sctp_state,
......
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