From e4b33be6fc808ad8e29deb3aebeed69d24667a86 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 12 May 2010 21:40:47 +0800 Subject: 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. --- openbsc/src/chan_alloc.c | 5 +++++ 1 file changed, 5 insertions(+) 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 */ -- cgit v1.2.3