diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-15 11:21:02 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-15 11:24:53 +0200 |
commit | 135f797a3711d317a9aef43f0efa9fb8764a0d10 (patch) | |
tree | 0c4401814e1e95462d6de083a2c4622fa991343f /openbsc/src/chan_alloc.c | |
parent | f8eff2e4b537c00cfc8a17991759df0f58a29148 (diff) |
[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.
Diffstat (limited to 'openbsc/src/chan_alloc.c')
-rw-r--r-- | openbsc/src/chan_alloc.c | 14 |
1 files changed, 14 insertions, 0 deletions
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) { |