aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-05-12 21:40:47 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-05-12 22:09:24 +0800
commite4b33be6fc808ad8e29deb3aebeed69d24667a86 (patch)
treee0eafe338b5c98efb63aeb4dbc9ee6fe7a90ac58
parentcc7461cefc7944948ae2f8ad9dd93bb4cf0ca172 (diff)
chan: After sending the GSM04.08 RR Release, reset the subscriber and wait
After we send the SACH DEACTIVATE the BTS will get back to us with a Release Indication which will trigger the RF Channel Release handling. This is why we can return here, but we need to put the subscriber reference to make sure to not end in a infinite loop. This and the previous change fix the USSD issue for me.
-rw-r--r--openbsc/src/chan_alloc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/openbsc/src/chan_alloc.c b/openbsc/src/chan_alloc.c
index 40d655409..623069ff0 100644
--- a/openbsc/src/chan_alloc.c
+++ b/openbsc/src/chan_alloc.c
@@ -381,6 +381,11 @@ static void _lchan_handle_release(struct gsm_lchan *lchan)
++lchan->conn.use_count;
gsm48_send_rr_release(lchan);
--lchan->conn.use_count;
+
+ /* avoid reentrancy */
+ subscr_put(lchan->conn.subscr);
+ lchan->conn.subscr = NULL;
+ return;
}
/* spoofed? message */