OM2K: Skip the entire CON MO if there are no connection groups

If the user doesn't specify any CON connection groups in the config
file, then the CON is not used.  The current code runs into an error
condition, as abis_om2k_tx_con_conf_req() never sends the CON CONF REQ
if the groups list is empty, but we still wait in the FSM for the
arrival of a CFG REQ ACCEPT.  The CON FSM eventually times out in T10
and we proceed with the IS, ignoring the error.

With this patch, we simply skip the entire CON MO in case there is no
related configuration.

Change-Id: Ia4d5bd96734686381f04aa3b380b17a161a31174
This commit is contained in:
Harald Welte 2020-12-21 00:02:54 +01:00
parent 65c02aeb1d
commit c551583fee
1 changed files with 10 additions and 5 deletions

View File

@ -2389,10 +2389,14 @@ static void om2k_bts_s_wait_tf(struct osmo_fsm_inst *fi, uint32_t event, void *d
OSMO_ASSERT(event == OM2K_BTS_EVT_TF_DONE);
osmo_fsm_inst_state_chg(fi, OM2K_BTS_S_WAIT_CON,
BTS_FSM_TIMEOUT, 0);
om2k_mo_fsm_start(fi, OM2K_BTS_EVT_CON_DONE, bts->c0,
&bts->rbs2000.con.om2k_mo);
if (!llist_count(&bts->rbs2000.con.conn_groups)) {
/* skip CON object if we have no configuration for it */
osmo_fsm_inst_state_chg(fi, OM2K_BTS_S_WAIT_IS, BTS_FSM_TIMEOUT, 0);
om2k_mo_fsm_start(fi, OM2K_BTS_EVT_IS_DONE, bts->c0, &bts->rbs2000.is.om2k_mo);
} else {
osmo_fsm_inst_state_chg(fi, OM2K_BTS_S_WAIT_CON, BTS_FSM_TIMEOUT, 0);
om2k_mo_fsm_start(fi, OM2K_BTS_EVT_CON_DONE, bts->c0, &bts->rbs2000.con.om2k_mo);
}
}
static void om2k_bts_s_wait_con(struct osmo_fsm_inst *fi, uint32_t event, void *data)
@ -2486,7 +2490,8 @@ static const struct osmo_fsm_state om2k_bts_states[] = {
[OM2K_BTS_S_WAIT_TF] = {
.in_event_mask = S(OM2K_BTS_EVT_TF_DONE),
.out_state_mask = S(OM2K_BTS_S_ERROR) |
S(OM2K_BTS_S_WAIT_CON),
S(OM2K_BTS_S_WAIT_CON) |
S(OM2K_BTS_S_WAIT_IS),
.name = "WAIT-TF",
.action = om2k_bts_s_wait_tf,
},