aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-10-11 16:50:36 +0200
committerHarald Welte <laforge@gnumonks.org>2018-10-12 06:21:35 +0000
commit6c5f5efa376043b31aa663d40bcd57960d4c37f4 (patch)
treec1956be241e4ee659638b97405bdc6659c515ed6
parent83ca9edfd1d25e1e2eaef23114b68f77cff55876 (diff)
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
-rw-r--r--src/osmo-bsc/bsc_subscr_conn_fsm.c4
1 files changed, 3 insertions, 1 deletions
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);
}