From 513da17732fe498c7fddf48b027bd479f356095f Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Thu, 11 Aug 2011 04:44:12 +0200 Subject: 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) --- openbsc/src/libbsc/abis_rsl.c | 6 ++++-- 1 file 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); } -- cgit v1.2.3