aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/chan_alloc.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-05-14 02:42:15 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-05-14 02:42:15 +0800
commit7373109abc9829c49eabf26e951a0ec6647666ac (patch)
treef508489f955c15fc36376374072cfb8ce6a9e6de /openbsc/src/chan_alloc.c
parentc1cb5eb38d5199de9049c59dc080051deba7aa53 (diff)
parentcf5cc5bb5b472f470eb9584a32dee3c38413f93a (diff)
Merge branch 'master' into on-waves/mgcp
Diffstat (limited to 'openbsc/src/chan_alloc.c')
-rw-r--r--openbsc/src/chan_alloc.c15
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;
}