summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-06-13 09:59:18 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2013-07-29 12:44:56 +0200
commitfd3a41f145746f1ab3cd6d3208f59ed2e1d145f3 (patch)
treeacbe81217aa09d277bb8d3150a96655ca45ed2b1
parent869dd4aa67760c9e102ced54c1d7e9690e7b72dc (diff)
Fix assignment failure handling at bsc_api.c
If assignment fails, we must check if the secondary lchan has been released already. This can happen if the BTS indicates a CHANNEL FAILURE INDICATION, then the BSC already released the secondary lchan.
-rw-r--r--openbsc/src/libbsc/bsc_api.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c
index 22e774c03..db3d1bb5f 100644
--- a/openbsc/src/libbsc/bsc_api.c
+++ b/openbsc/src/libbsc/bsc_api.c
@@ -524,8 +524,10 @@ static void handle_ass_fail(struct gsm_subscriber_connection *conn,
/* stop the timer and release it */
osmo_timer_del(&conn->T10);
- lchan_release(conn->secondary_lchan, 0, RSL_REL_LOCAL_END);
- conn->secondary_lchan = NULL;
+ if (conn->secondary_lchan) {
+ lchan_release(conn->secondary_lchan, 0, RSL_REL_LOCAL_END);
+ conn->secondary_lchan = NULL;
+ }
gh = msgb_l3(msg);
if (msgb_l3len(msg) - sizeof(*gh) != 1) {