From 6c5f5efa376043b31aa663d40bcd57960d4c37f4 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Thu, 11 Oct 2018 16:50:36 +0200 Subject: gscon_forget_lchan(): Clear Request iff no lchans remain Send a BSSMAP Clear Request only if absolutely no lchan remains associated to the conn, anywhere (Assignment, Handover as well as primary lchan). Conceivable would be a situation where e.g. we're in handover and a new lchan is ready, when just at a time where it doesn't matter anymore the old lchan fails. We could just carry on with the new one then. Change-Id: Ibd8e38ccf7759b8834efdedf742c46c227b26e91 --- src/osmo-bsc/bsc_subscr_conn_fsm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c index 3c9be56e7..a8b318336 100644 --- a/src/osmo-bsc/bsc_subscr_conn_fsm.c +++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c @@ -646,7 +646,9 @@ void gscon_forget_lchan(struct gsm_subscriber_connection *conn, struct gsm_lchan conn->lchan = NULL; if (conn->fi->state != ST_CLEARING - && !conn->lchan) + && !conn->lchan + && !conn->ho.new_lchan + && !conn->assignment.new_lchan) gscon_bssmap_clear(conn, GSM0808_CAUSE_EQUIPMENT_FAILURE); } -- cgit v1.2.3