Changed S1AP causes for non-existing cell in HO and not available radio resources in HO for more apropriate ones.

master
Francisco Paisana 3 years ago
parent 227ae97bcb
commit 1dfc884b65

@ -150,7 +150,7 @@ uint16_t rrc::start_ho_ue_resource_alloc(const asn1::s1ap::ho_request_s&
const enb_cell_common* target_cell = cell_common_list->get_cell_id(rrc_details::eci_to_cellid(target_eci)); const enb_cell_common* target_cell = cell_common_list->get_cell_id(rrc_details::eci_to_cellid(target_eci));
if (target_cell == nullptr) { if (target_cell == nullptr) {
logger.error("The S1-handover target cell_id=0x%x does not exist", rrc_details::eci_to_cellid(target_eci)); logger.error("The S1-handover target cell_id=0x%x does not exist", rrc_details::eci_to_cellid(target_eci));
cause.set_radio_network().value = asn1::s1ap::cause_radio_network_opts::ho_target_not_allowed; cause.set_radio_network().value = asn1::s1ap::cause_radio_network_opts::cell_not_available;
return SRSRAN_INVALID_RNTI; return SRSRAN_INVALID_RNTI;
} }
@ -166,7 +166,7 @@ uint16_t rrc::start_ho_ue_resource_alloc(const asn1::s1ap::ho_request_s&
uint16_t rnti = mac->reserve_new_crnti(ue_cfg); uint16_t rnti = mac->reserve_new_crnti(ue_cfg);
if (rnti == SRSRAN_INVALID_RNTI) { if (rnti == SRSRAN_INVALID_RNTI) {
logger.error("Failed to allocate C-RNTI resources"); logger.error("Failed to allocate C-RNTI resources");
cause.set_radio_network().value = asn1::s1ap::cause_radio_network_opts::radio_res_not_available; cause.set_radio_network().value = asn1::s1ap::cause_radio_network_opts::no_radio_res_available_in_target_cell;
return SRSRAN_INVALID_RNTI; return SRSRAN_INVALID_RNTI;
} }
@ -228,7 +228,7 @@ void rrc::ue::rrc_mobility::handle_ue_meas_report(const meas_report_s& msg, srsr
} }
if (meas_res.meas_result_neigh_cells.type().value != if (meas_res.meas_result_neigh_cells.type().value !=
meas_results_s::meas_result_neigh_cells_c_::types::meas_result_list_eutra) { meas_results_s::meas_result_neigh_cells_c_::types::meas_result_list_eutra) {
Info("Skipping MeasReport for non-EUTRA neighbor."); Error("MeasReports regarding non-EUTRA are not supported!");
return; return;
} }
const meas_id_list& measid_list = rrc_ue->current_ue_cfg.meas_cfg.meas_id_to_add_mod_list; const meas_id_list& measid_list = rrc_ue->current_ue_cfg.meas_cfg.meas_id_to_add_mod_list;

@ -305,9 +305,9 @@ int test_s1ap_tenb_mobility(test_event test_params)
asn1::s1ap::cause_c cause; asn1::s1ap::cause_c cause;
int rnti = tester.rrc.start_ho_ue_resource_alloc(ho_req, container, cause); int rnti = tester.rrc.start_ho_ue_resource_alloc(ho_req, container, cause);
if (test_params == test_event::wrong_target_cell) { if (test_params == test_event::wrong_target_cell) {
TESTASSERT(rnti == SRSRAN_INVALID_RNTI); TESTASSERT_EQ(SRSRAN_INVALID_RNTI, rnti);
TESTASSERT(cause.type().value == asn1::s1ap::cause_c::types_opts::radio_network); TESTASSERT(cause.type().value == asn1::s1ap::cause_c::types_opts::radio_network);
TESTASSERT(cause.radio_network().value == asn1::s1ap::cause_radio_network_opts::ho_target_not_allowed); TESTASSERT_EQ(asn1::s1ap::cause_radio_network_opts::cell_not_available, cause.radio_network().value);
TESTASSERT(tester.rrc.get_nof_users() == 0); TESTASSERT(tester.rrc.get_nof_users() == 0);
return SRSRAN_SUCCESS; return SRSRAN_SUCCESS;
} }

Loading…
Cancel
Save