Change in osmo-bsc[master]: OM2K: Skip the entire CON MO if there are no connection groups

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sun Dec 20 23:18:28 UTC 2020


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/21814 )


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

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
---
M src/osmo-bsc/abis_om2000.c
1 file changed, 10 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/14/21814/1

diff --git a/src/osmo-bsc/abis_om2000.c b/src/osmo-bsc/abis_om2000.c
index c74c0eb..a1eed5b 100644
--- a/src/osmo-bsc/abis_om2000.c
+++ b/src/osmo-bsc/abis_om2000.c
@@ -2389,10 +2389,14 @@
 
 	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 @@
 	[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,
 	},

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/21814
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ia4d5bd96734686381f04aa3b380b17a161a31174
Gerrit-Change-Number: 21814
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201220/e25b7cad/attachment.htm>


More information about the gerrit-log mailing list