<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/21814">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">OM2K: Skip the entire CON MO if there are no connection groups<br><br>If the user doesn't specify any CON connection groups in the config<br>file, then the CON is not used.  The current code runs into an error<br>condition, as abis_om2k_tx_con_conf_req() never sends the CON CONF REQ<br>if the groups list is empty, but we still wait in the FSM for the<br>arrival of a CFG REQ ACCEPT.  The CON FSM eventually times out in T10<br>and we proceed with the IS, ignoring the error.<br><br>With this patch, we simply skip the entire CON MO in case there is no<br>related configuration.<br><br>Change-Id: Ia4d5bd96734686381f04aa3b380b17a161a31174<br>---<br>M src/osmo-bsc/abis_om2000.c<br>1 file changed, 10 insertions(+), 5 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/14/21814/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/abis_om2000.c b/src/osmo-bsc/abis_om2000.c</span><br><span>index c74c0eb..a1eed5b 100644</span><br><span>--- a/src/osmo-bsc/abis_om2000.c</span><br><span>+++ b/src/osmo-bsc/abis_om2000.c</span><br><span>@@ -2389,10 +2389,14 @@</span><br><span> </span><br><span>       OSMO_ASSERT(event == OM2K_BTS_EVT_TF_DONE);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- osmo_fsm_inst_state_chg(fi, OM2K_BTS_S_WAIT_CON,</span><br><span style="color: hsl(0, 100%, 40%);">-                                BTS_FSM_TIMEOUT, 0);</span><br><span style="color: hsl(0, 100%, 40%);">-    om2k_mo_fsm_start(fi, OM2K_BTS_EVT_CON_DONE, bts->c0,</span><br><span style="color: hsl(0, 100%, 40%);">-                          &bts->rbs2000.con.om2k_mo);</span><br><span style="color: hsl(120, 100%, 40%);">+  if (!llist_count(&bts->rbs2000.con.conn_groups)) {</span><br><span style="color: hsl(120, 100%, 40%);">+             /* skip CON object if we have no configuration for it */</span><br><span style="color: hsl(120, 100%, 40%);">+              osmo_fsm_inst_state_chg(fi, OM2K_BTS_S_WAIT_IS, BTS_FSM_TIMEOUT, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+          om2k_mo_fsm_start(fi, OM2K_BTS_EVT_IS_DONE, bts->c0, &bts->rbs2000.is.om2k_mo);</span><br><span style="color: hsl(120, 100%, 40%);">+     } else {</span><br><span style="color: hsl(120, 100%, 40%);">+              osmo_fsm_inst_state_chg(fi, OM2K_BTS_S_WAIT_CON, BTS_FSM_TIMEOUT, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+         om2k_mo_fsm_start(fi, OM2K_BTS_EVT_CON_DONE, bts->c0, &bts->rbs2000.con.om2k_mo);</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span> }</span><br><span> </span><br><span> static void om2k_bts_s_wait_con(struct osmo_fsm_inst *fi, uint32_t event, void *data)</span><br><span>@@ -2486,7 +2490,8 @@</span><br><span>  [OM2K_BTS_S_WAIT_TF] = {</span><br><span>             .in_event_mask = S(OM2K_BTS_EVT_TF_DONE),</span><br><span>            .out_state_mask = S(OM2K_BTS_S_ERROR) |</span><br><span style="color: hsl(0, 100%, 40%);">-                           S(OM2K_BTS_S_WAIT_CON),</span><br><span style="color: hsl(120, 100%, 40%);">+                               S(OM2K_BTS_S_WAIT_CON) |</span><br><span style="color: hsl(120, 100%, 40%);">+                              S(OM2K_BTS_S_WAIT_IS),</span><br><span>             .name = "WAIT-TF",</span><br><span>                 .action = om2k_bts_s_wait_tf,</span><br><span>        },</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/21814">change 21814</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-bsc/+/21814"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ia4d5bd96734686381f04aa3b380b17a161a31174 </div>
<div style="display:none"> Gerrit-Change-Number: 21814 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>