|
|
|
@ -220,6 +220,7 @@ void s1ap::ue::ho_prep_proc_t::then(const srsran::proc_state_t& result)
|
|
|
|
|
srsran::proc_outcome_t s1ap::s1_setup_proc_t::init()
|
|
|
|
|
{
|
|
|
|
|
procInfo("Starting new MME connection.");
|
|
|
|
|
connect_count++;
|
|
|
|
|
return start_mme_connection();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -265,7 +266,7 @@ srsran::proc_outcome_t s1ap::s1_setup_proc_t::react(const srsenb::s1ap::s1_setup
|
|
|
|
|
return srsran::proc_outcome_t::error;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void s1ap::s1_setup_proc_t::then(const srsran::proc_state_t& result) const
|
|
|
|
|
void s1ap::s1_setup_proc_t::then(const srsran::proc_state_t& result)
|
|
|
|
|
{
|
|
|
|
|
if (result.is_error()) {
|
|
|
|
|
procInfo("Failed to initiate S1 connection. Attempting reconnection in %d seconds",
|
|
|
|
@ -276,7 +277,12 @@ void s1ap::s1_setup_proc_t::then(const srsran::proc_state_t& result) const
|
|
|
|
|
s1ap_ptr->mme_socket.close();
|
|
|
|
|
procInfo("S1AP socket closed.");
|
|
|
|
|
s1ap_ptr->mme_connect_timer.run();
|
|
|
|
|
if (connect_count > s1ap_ptr->args.max_s1_setup_retries) {
|
|
|
|
|
s1ap_ptr->alarms_channel("s1apError");
|
|
|
|
|
}
|
|
|
|
|
// Try again with in 10 seconds
|
|
|
|
|
} else {
|
|
|
|
|
connect_count = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -287,7 +293,11 @@ void s1ap::s1_setup_proc_t::then(const srsran::proc_state_t& result) const
|
|
|
|
|
s1ap::s1ap(srsran::task_sched_handle task_sched_,
|
|
|
|
|
srslog::basic_logger& logger,
|
|
|
|
|
srsran::socket_manager_itf* rx_socket_handler_) :
|
|
|
|
|
s1setup_proc(this), logger(logger), task_sched(task_sched_), rx_socket_handler(rx_socket_handler_)
|
|
|
|
|
s1setup_proc(this),
|
|
|
|
|
logger(logger),
|
|
|
|
|
task_sched(task_sched_),
|
|
|
|
|
rx_socket_handler(rx_socket_handler_),
|
|
|
|
|
alarms_channel(srslog::fetch_log_channel("alarms"))
|
|
|
|
|
{
|
|
|
|
|
mme_task_queue = task_sched.make_task_queue();
|
|
|
|
|
}
|
|
|
|
@ -303,7 +313,7 @@ int s1ap::init(const s1ap_args_t& args_, rrc_interface_s1ap* rrc_)
|
|
|
|
|
mme_connect_timer = task_sched.get_unique_timer();
|
|
|
|
|
auto mme_connect_run = [this](uint32_t tid) {
|
|
|
|
|
if (s1setup_proc.is_busy()) {
|
|
|
|
|
logger.error("Failed to initiate S1Setup procedure.");
|
|
|
|
|
logger.error("Failed to initiate S1Setup procedure: procedure is busy.");
|
|
|
|
|
}
|
|
|
|
|
s1setup_proc.launch();
|
|
|
|
|
};
|
|
|
|
@ -321,7 +331,7 @@ int s1ap::init(const s1ap_args_t& args_, rrc_interface_s1ap* rrc_)
|
|
|
|
|
running = true;
|
|
|
|
|
// starting MME connection
|
|
|
|
|
if (not s1setup_proc.launch()) {
|
|
|
|
|
logger.error("Failed to initiate S1Setup procedure.");
|
|
|
|
|
logger.error("Failed to initiate S1Setup procedure: error launching procedure.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return SRSRAN_SUCCESS;
|
|
|
|
|