diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-05-14 02:42:15 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-05-14 02:42:15 +0800 |
commit | 7373109abc9829c49eabf26e951a0ec6647666ac (patch) | |
tree | f508489f955c15fc36376374072cfb8ce6a9e6de /openbsc/src/chan_alloc.c | |
parent | c1cb5eb38d5199de9049c59dc080051deba7aa53 (diff) | |
parent | cf5cc5bb5b472f470eb9584a32dee3c38413f93a (diff) |
Merge branch 'master' into on-waves/mgcp
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 cd48e4359..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) { @@ -348,6 +362,7 @@ int lchan_auto_release(struct gsm_lchan *lchan) lchan->conn.use_count); DEBUGP(DRLL, "%s Recycling Channel\n", gsm_lchan_name(lchan)); + rsl_lchan_set_state(lchan, LCHAN_S_REL_REQ); rsl_release_request(lchan, 0); return 1; } |