<p>Neels Hofmeyr has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/10193">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">cosmetic: gscon: don't re-enter ST_CLEARING<br><br>I often see "ERROR [ST_CLEARING] Entering ST_CLEARING not permitted!", avoid<br>the bogus error messages by checking entering ST_CLEARING only if not in it<br>yet. Still don't allow re-entering, to not restart the timeout.<br><br>Change-Id: Ia1f171c08dcbc529f907a20eed43bf5ee3a452b3<br>---<br>M src/osmo-bsc/bsc_subscr_conn_fsm.c<br>1 file changed, 6 insertions(+), 3 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/93/10193/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c</span><br><span>index 60a9a75..fd3c293 100644</span><br><span>--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c</span><br><span>+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c</span><br><span>@@ -290,7 +290,8 @@</span><br><span>                              osmo_fsm_inst_state_name(conn->fi));</span><br><span>               }</span><br><span>            gscon_bssmap_clear(conn, GSM0808_CAUSE_EQUIPMENT_FAILURE);</span><br><span style="color: hsl(0, 100%, 40%);">-              osmo_fsm_inst_state_chg(fi, ST_CLEARING, 60, 999);</span><br><span style="color: hsl(120, 100%, 40%);">+            if (conn->fi->state != ST_CLEARING)</span><br><span style="color: hsl(120, 100%, 40%);">+                     osmo_fsm_inst_state_chg(fi, ST_CLEARING, 60, 999);</span><br><span>           return;</span><br><span>      default:</span><br><span>             OSMO_ASSERT(false);</span><br><span>@@ -626,7 +627,8 @@</span><br><span>            conn->lchan = NULL;</span><br><span>       }</span><br><span>    if (!conn->lchan) {</span><br><span style="color: hsl(0, 100%, 40%);">-          osmo_fsm_inst_state_chg(conn->fi, ST_CLEARING, 60, 999);</span><br><span style="color: hsl(120, 100%, 40%);">+           if (conn->fi->state != ST_CLEARING)</span><br><span style="color: hsl(120, 100%, 40%);">+                     osmo_fsm_inst_state_chg(conn->fi, ST_CLEARING, 60, 999);</span><br><span>          gscon_bssmap_clear(conn, GSM0808_CAUSE_EQUIPMENT_FAILURE);</span><br><span>   }</span><br><span> }</span><br><span>@@ -670,7 +672,8 @@</span><br><span>         switch (event) {</span><br><span>     case GSCON_EV_A_CLEAR_CMD:</span><br><span>           /* MSC tells us to cleanly shut down */</span><br><span style="color: hsl(0, 100%, 40%);">-         osmo_fsm_inst_state_chg(fi, ST_CLEARING, 60, 999);</span><br><span style="color: hsl(120, 100%, 40%);">+            if (conn->fi->state != ST_CLEARING)</span><br><span style="color: hsl(120, 100%, 40%);">+                     osmo_fsm_inst_state_chg(fi, ST_CLEARING, 60, 999);</span><br><span>           LOGPFSML(fi, LOGL_DEBUG, "Releasing all lchans (if any) after BSSMAP Clear Command\n");</span><br><span>            gscon_release_lchans(conn, true);</span><br><span>            /* FIXME: Release all terestrial resources in ST_CLEARING */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10193">change 10193</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/10193"/><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-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ia1f171c08dcbc529f907a20eed43bf5ee3a452b3 </div>
<div style="display:none"> Gerrit-Change-Number: 10193 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>