diff options
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2021-12-13 16:59:00 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2022-01-11 19:27:15 +0100
commit97baecd9ef074c1ef056a582cfbdffa6ea844e59 (patch)
parent35422db1c2aa169dee50c9ae668b96dc28a64a76 (diff)
gscon clear: without SCCP conn, no need to wait for RLSD timeoutneels/clear
Skip the BSSMAP Clear and SCCP RLSD parts and immediately deallocate the gscon when there is no SCCP connection present. Before this patch, such conn would stick around for a minute before a timeout deallocates it. Related: OS#5337 Change-Id: I8c8537acf6b47b121903197608636c43ae601a57
1 files changed, 4 insertions, 0 deletions
diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index 121b15474..b3e7c57bc 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -210,6 +210,10 @@ void gscon_fsm_wait_sccp_rlsd_onenter(struct osmo_fsm_inst *fi, uint32_t prev_st
gscon_release_lchans(conn, true, bsc_gsm48_rr_cause_from_gsm0808_cause(conn->clear_cause));
+ /* If there is no SCCP connection at all, then no need to wait for an SCCP RLSD. */
+ if (!conn->sccp.msc || conn->sccp.state != SUBSCR_SCCP_ST_CONNECTED)
+ osmo_fsm_inst_term(fi, OSMO_FSM_TERM_REGULAR, NULL);
/* forward MO DTAP from RSL side to BSSAP side */