From 8da710307015955bc2540c6d03c7e8f99fc45981 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 9 Apr 2010 12:44:21 +0200 Subject: [rsl] Set the release state from within the lchan class Currently our GSM04.11 code is closing the link for SAPI=3 and this would mean that the whole channel would be scheduled for close... where we only want to close everything when freeing the lchan or handling an error. --- openbsc/src/abis_rsl.c | 1 - openbsc/src/chan_alloc.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/openbsc/src/abis_rsl.c b/openbsc/src/abis_rsl.c index af111bce4..03626e7e3 100644 --- a/openbsc/src/abis_rsl.c +++ b/openbsc/src/abis_rsl.c @@ -762,7 +762,6 @@ int rsl_release_request(struct gsm_lchan *lchan, u_int8_t link_id, u_int8_t reas /* 0 is normal release, 1 is local end */ msgb_tv_put(msg, RSL_IE_RELEASE_MODE, reason); - rsl_lchan_set_state(lchan, LCHAN_S_REL_REQ); /* FIXME: start some timer in case we don't receive a REL ACK ? */ msg->trx = lchan->ts->trx; diff --git a/openbsc/src/chan_alloc.c b/openbsc/src/chan_alloc.c index 5ca47f909..08d9b85ac 100644 --- a/openbsc/src/chan_alloc.c +++ b/openbsc/src/chan_alloc.c @@ -343,6 +343,7 @@ int _lchan_release(struct gsm_lchan *lchan, u_int8_t release_reason) lchan->conn.use_count); DEBUGP(DRLL, "%s Recycling Channel\n", gsm_lchan_name(lchan)); + rsl_lchan_set_state(lchan, LCHAN_S_REL_REQ); rsl_release_request(lchan, 0, release_reason); return 1; } -- cgit v1.2.3