Commit f1a1ff03 authored by Robert Schmidt's avatar Robert Schmidt

FlexRAN: HO request first check whether X2 is active, minor indentation fixes

parent a6be54a6
...@@ -4819,12 +4819,17 @@ flexran_rrc_eNB_trigger_handover (int mod_id, ...@@ -4819,12 +4819,17 @@ flexran_rrc_eNB_trigger_handover (int mod_id,
rrc_eNB_ue_context_t *ue_context_pP, rrc_eNB_ue_context_t *ue_context_pP,
int target_cell_id) { int target_cell_id) {
uint32_t earfcn_dl; uint32_t earfcn_dl;
uint8_t KeNB_star[32] = { 0 }; uint8_t KeNB_star[32] = { 0 };
int cell_found = 0; int cell_found = 0;
/* Check if eNB id belongs to the supported ones-Extend for multiple carrieres */ /* if X2AP is disabled, do nothing */
if (!is_x2ap_enabled()) {
LOG_E(RRC, "X2 is disabled\n");
return -1;
}
/* Check if eNB id belongs to the supported ones-Extend for multiple carrieres */
for (int i=0; i < RC.rrc[mod_id]->num_neigh_cells; i++) { for (int i=0; i < RC.rrc[mod_id]->num_neigh_cells; i++) {
if (RC.rrc[mod_id]->neigh_cells_id[i][0] == target_cell_id) { if (RC.rrc[mod_id]->neigh_cells_id[i][0] == target_cell_id) {
cell_found = 1; cell_found = 1;
...@@ -4833,20 +4838,12 @@ int cell_found = 0; ...@@ -4833,20 +4838,12 @@ int cell_found = 0;
} }
/* Check if eNB id was found */ /* Check if eNB id was found */
if (!cell_found) { if (!cell_found) {
LOG_E(RRC, "%s(): cannot find target eNB with phyCellId %d\n", __func__, target_cell_id); LOG_E(RRC, "%s(): cannot find target eNB with phyCellId %d\n", __func__, target_cell_id);
return -1; return -1;
} }
/* Handover process is following */ /* Handover process is following */
/* if X2AP is disabled, do nothing */
if (!is_x2ap_enabled()) {
LOG_E(RRC, "X2 is disabled\n");
return -1;
}
LOG_D(RRC, "Handover is triggered by FlexRAN controller...\n"); LOG_D(RRC, "Handover is triggered by FlexRAN controller...\n");
/* if the UE is not in handover mode, start handover procedure */ /* if the UE is not in handover mode, start handover procedure */
......
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