summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2011-08-11 04:44:12 +0200
committerHarald Welte <laforge@gnumonks.org>2011-08-11 17:21:24 +0200
commit513da17732fe498c7fddf48b027bd479f356095f (patch)
treec743aab1f650b961819176d3fb691e0dec075f83
parent563d99d3c34861da410bb043d0379b75dfaefdf3 (diff)
libbsc: Call lchan_free in the timeout callbacks
This makes sure that the lchans can be used again. (state and type are set to NONE)
-rw-r--r--openbsc/src/libbsc/abis_rsl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 8a326def9..4b3076322 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -185,7 +185,8 @@ static void lchan_act_tmr_cb(void *data)
LOGP(DRSL, LOGL_NOTICE, "%s Timeout during activation!\n",
gsm_lchan_name(lchan));
- lchan->state = LCHAN_S_NONE;
+ rsl_lchan_set_state(lchan, LCHAN_S_NONE);
+ lchan_free(lchan);
}
static void lchan_deact_tmr_cb(void *data)
@@ -195,7 +196,8 @@ static void lchan_deact_tmr_cb(void *data)
LOGP(DRSL, LOGL_NOTICE, "%s Timeout during deactivation!\n",
gsm_lchan_name(lchan));
- lchan->state = LCHAN_S_NONE;
+ rsl_lchan_set_state(lchan, LCHAN_S_NONE);
+ lchan_free(lchan);
}