From 1d8286eb6239c662e7b752d99c8eea38ef9157a4 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Mon, 24 Aug 2020 16:28:53 +0100 Subject: [PATCH] always wait for t304 to expire in case of failed handover --- srsue/src/stack/rrc/rrc.cc | 1 + srsue/src/stack/rrc/rrc_procedures.cc | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/srsue/src/stack/rrc/rrc.cc b/srsue/src/stack/rrc/rrc.cc index be729733b..a9649e5e4 100644 --- a/srsue/src/stack/rrc/rrc.cc +++ b/srsue/src/stack/rrc/rrc.cc @@ -919,6 +919,7 @@ bool rrc::con_reconfig(const rrc_conn_recfg_s& reconfig) void rrc::ho_failed() { ho_handler.trigger(ho_proc::t304_expiry{}); + start_con_restablishment(reest_cause_e::ho_fail); } // Reconfiguration failure or Section 5.3.5.5 diff --git a/srsue/src/stack/rrc/rrc_procedures.cc b/srsue/src/stack/rrc/rrc_procedures.cc index 65910d737..fccd307fb 100644 --- a/srsue/src/stack/rrc/rrc_procedures.cc +++ b/srsue/src/stack/rrc/rrc_procedures.cc @@ -1358,6 +1358,7 @@ srslte::proc_outcome_t rrc::ho_proc::init(const asn1::rrc::rrc_conn_recfg_s& rrc if (mob_ctrl_info->target_pci == rrc_ptr->meas_cells.serving_cell().get_pci()) { rrc_ptr->rrc_log->console("Warning: Received HO command to own cell\n"); Warning("Received HO command to own cell\n"); + rrc_ptr->con_reconfig_failed(); return proc_outcome_t::error; } @@ -1374,6 +1375,7 @@ srslte::proc_outcome_t rrc::ho_proc::init(const asn1::rrc::rrc_conn_recfg_s& rrc Error("Could not find target cell earfcn=%d, pci=%d\n", rrc_ptr->meas_cells.serving_cell().get_earfcn(), mob_ctrl_info->target_pci); + rrc_ptr->con_reconfig_failed(); return proc_outcome_t::error; } @@ -1527,10 +1529,9 @@ srslte::proc_outcome_t rrc::ho_proc::react(ra_completed_ev ev) void rrc::ho_proc::then(const srslte::proc_state_t& result) { - rrc_ptr->t304.stop(); Info("Finished HO Preparation %s\n", result.is_success() ? "successfully" : "with error"); - if (result.is_error()) { - rrc_ptr->start_con_restablishment(reest_cause_e::ho_fail); + if (rrc_ptr->t304.is_running()) { + Info("Waiting for t304 to expire to start the Reestablishment procedure\n"); } }