laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28093 )
Change subject: do not BSSMAP Clear on lchan rel when LCS is still ongoing ......................................................................
do not BSSMAP Clear on lchan rel when LCS is still ongoing
The proper way to fix this is having a use count on the SCCP conn, one each for a busy lchan and a busy Location Request. That would require a bunch more work and testing.
This patch is the least-effort way to avoid the following scenario:
Emergency call is started; Location Request is started to locate the emergency; lchan releases early for any reason; Perfectly fine Location Request gets canceled by Clear Request; The information was there, but we did not forward the location; No help at emergency because of my code.
Allow Location Request to complete for these cases: - rx RLL REL IND (or any other reason for gscon_lchan_releasing()) - rx RSL CONN FAIL
Related: SYS#5912 Related: Idea690a4aa4aecbe4642a16e96d086cc0538564a (osmo-ttcn3-hacks) Change-Id: Ib44dd05b0adee84234f671313b156ff6625357cc --- M src/osmo-bsc/bsc_subscr_conn_fsm.c 1 file changed, 6 insertions(+), 3 deletions(-)
Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified
diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c index 428d200..54d3975 100644 --- a/src/osmo-bsc/bsc_subscr_conn_fsm.c +++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c @@ -878,8 +878,9 @@ lchan_forget_conn(conn->lchan); conn->lchan = NULL; } - /* If the conn has no lchan anymore, it was released by the BTS and needs to Clear towards MSC. */ - if (!conn->lchan) { + /* If the conn has no lchan anymore, it was released by the BTS and needs to Clear towards MSC. + * However, if a Location Request is still busy, do not send Clear Request. */ + if (!conn->lchan && !conn->lcs.loc_req) { switch (conn->fi->state) { case ST_WAIT_CC: /* The SCCP connection was not yet confirmed by a CC, the BSSAP is not fully established @@ -984,7 +985,9 @@ conn->lchan->release.rr_cause = bsc_gsm48_rr_cause_from_rsl_cause(conn->lchan->release.rsl_error_cause); } - gscon_bssmap_clear(conn, GSM0808_CAUSE_RADIO_INTERFACE_FAILURE); + /* Request BSSMAP Clear, but do not abort an ongoing Location Request */ + if (!conn->lcs.loc_req) + gscon_bssmap_clear(conn, GSM0808_CAUSE_RADIO_INTERFACE_FAILURE); break; case GSCON_EV_MGW_MDCX_RESP_MSC: LOGPFSML(fi, LOGL_DEBUG, "Rx MDCX of MSC side (LCLS?)\n");