From 135f797a3711d317a9aef43f0efa9fb8764a0d10 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 15 Apr 2010 11:21:02 +0200 Subject: [bsc_init] When the RSL/OML connection drops, free all lchans Free all allocated channels on the TRX that failed, go through lchan_free to signal higher layers and then force a reset of the channel. Make the TRX and TS unusable by setting the operational set to 0 (not really defined) which should be reset once the RSL is coming up again. --- openbsc/src/chan_alloc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'openbsc/src/chan_alloc.c') diff --git a/openbsc/src/chan_alloc.c b/openbsc/src/chan_alloc.c index 118deca10..107abdc92 100644 --- a/openbsc/src/chan_alloc.c +++ b/openbsc/src/chan_alloc.c @@ -330,6 +330,20 @@ void lchan_free(struct gsm_lchan *lchan) * channel using it */ } +/* + * There was an error with the TRX and we need to forget + * any state so that a lchan can be allocated again after + * the trx is fully usable. + */ +void lchan_reset(struct gsm_lchan *lchan) +{ + bsc_del_timer(&lchan->T3101); + + lchan->type = GSM_LCHAN_NONE; + lchan->state = LCHAN_S_NONE; +} + + /* Consider releasing the channel now */ int lchan_auto_release(struct gsm_lchan *lchan) { -- cgit v1.2.3