summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-01-14 21:56:37 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-01-15 00:02:54 +0100
commitbbf2139fdc32a7299646c44e046f1a165ccf9d86 (patch)
tree2a30abbd9d17afc9ce61ee7701933fbc876f6db7
parentc55f0a54150e26866aa7e8c65099f28add0d6761 (diff)
channel: The error timer and the lchan_deact_tmr are both running
In case a BTS does not send the RF Channel Release ACK and we are closing the channel because of an error two timers are running to set the state back to none. Make lchan_deact_tmr_cb and rsl_rx_rf_chan_rel_ack behave the same in regard to changing the state of the lchan. For the other direction we are save, the error path will set the state to NONE and the timeout will call lchan_free to set the channel type back to NONE, only then the lchan may be allocated again. The channel release procedure requires some more tweaking, some part was started in the zecke/28c3 branch and needs to be tested/integrated with the goal of having one common release path.
-rw-r--r--openbsc/src/libbsc/abis_rsl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 029b62b7f..63b8729b7 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -196,7 +196,8 @@ static void lchan_deact_tmr_cb(void *data)
LOGP(DRSL, LOGL_NOTICE, "%s Timeout during deactivation!\n",
gsm_lchan_name(lchan));
- rsl_lchan_set_state(lchan, LCHAN_S_NONE);
+ if (lchan->state != LCHAN_S_REL_ERR)
+ rsl_lchan_set_state(lchan, LCHAN_S_NONE);
lchan_free(lchan);
}