diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-11 19:34:43 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-11 19:34:43 +0200 |
commit | 4e23d5f87f4443c5cf01cda968c1aae26ba47dc0 (patch) | |
tree | e9ab58841f423e9e8694017960a880d66881d68c /openbsc/src/chan_alloc.c | |
parent | 434642498719a8ae47013f58a89199f13715d713 (diff) |
[bsc_init] When the RSL/OML connection drops, free all lchan
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).
Diffstat (limited to 'openbsc/src/chan_alloc.c')
-rw-r--r-- | openbsc/src/chan_alloc.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/openbsc/src/chan_alloc.c b/openbsc/src/chan_alloc.c index 48732f76c..1fb0a4f1e 100644 --- a/openbsc/src/chan_alloc.c +++ b/openbsc/src/chan_alloc.c @@ -322,6 +322,21 @@ 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); + bsc_del_timer(&lchan->T3111); + bsc_del_timer(&lchan->error_timer); + + lchan->type = GSM_LCHAN_NONE; + lchan->state = LCHAN_S_NONE; +} + static int _lchan_release_next_sapi(struct gsm_lchan *lchan) { int sapi; |