aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-07-27 16:01:24 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-07-28 12:18:23 +0200
commit94d30f2b25c57a5ddcbcce7e63cf3b813587c45f (patch)
tree10bc5655e0048392a32010a7d59f04bcae3156ec /src
parent34c881a811ad90a1b48b5a69728bd5213092b24f (diff)
cosmetic: gscon: don't re-enter ST_CLEARING
I often see "ERROR [ST_CLEARING] Entering ST_CLEARING not permitted!", avoid the bogus error messages by checking entering ST_CLEARING only if not in it yet. Still don't allow re-entering, to not restart the timeout. Change-Id: Ia1f171c08dcbc529f907a20eed43bf5ee3a452b3
Diffstat (limited to 'src')
-rw-r--r--src/osmo-bsc/bsc_subscr_conn_fsm.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index 60a9a7582..fd3c2931f 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -290,7 +290,8 @@ static void gscon_fsm_init(struct osmo_fsm_inst *fi, uint32_t event, void *data)
osmo_fsm_inst_state_name(conn->fi));
}
gscon_bssmap_clear(conn, GSM0808_CAUSE_EQUIPMENT_FAILURE);
- osmo_fsm_inst_state_chg(fi, ST_CLEARING, 60, 999);
+ if (conn->fi->state != ST_CLEARING)
+ osmo_fsm_inst_state_chg(fi, ST_CLEARING, 60, 999);
return;
default:
OSMO_ASSERT(false);
@@ -626,7 +627,8 @@ void gscon_lchan_releasing(struct gsm_subscriber_connection *conn, struct gsm_lc
conn->lchan = NULL;
}
if (!conn->lchan) {
- osmo_fsm_inst_state_chg(conn->fi, ST_CLEARING, 60, 999);
+ if (conn->fi->state != ST_CLEARING)
+ osmo_fsm_inst_state_chg(conn->fi, ST_CLEARING, 60, 999);
gscon_bssmap_clear(conn, GSM0808_CAUSE_EQUIPMENT_FAILURE);
}
}
@@ -670,7 +672,8 @@ static void gscon_fsm_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *d
switch (event) {
case GSCON_EV_A_CLEAR_CMD:
/* MSC tells us to cleanly shut down */
- osmo_fsm_inst_state_chg(fi, ST_CLEARING, 60, 999);
+ if (conn->fi->state != ST_CLEARING)
+ osmo_fsm_inst_state_chg(fi, ST_CLEARING, 60, 999);
LOGPFSML(fi, LOGL_DEBUG, "Releasing all lchans (if any) after BSSMAP Clear Command\n");
gscon_release_lchans(conn, true);
/* FIXME: Release all terestrial resources in ST_CLEARING */