aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2014-05-18 22:23:26 +0200
committerHarald Welte <laforge@gnumonks.org>2014-05-19 08:31:39 +0200
commita4c63b0cdba82a453875d9208d9dad0b9b530d56 (patch)
tree3d1e33375d64366bd696c57770e80215f1800c35 /openbsc
parentec757986442e5be817caae4dacc57ec6617b98dd (diff)
chan_alloc: Fall-back to TCH/H, if we cannot find a TCH/F
I'm not entirely sure if this is the best approach. However, there are phones that send a RACH request for TCH/F on MO calls, even though they actually do support TCH/H channels.
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/libbsc/chan_alloc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/openbsc/src/libbsc/chan_alloc.c b/openbsc/src/libbsc/chan_alloc.c
index 9b74329f4..f6eb5af14 100644
--- a/openbsc/src/libbsc/chan_alloc.c
+++ b/openbsc/src/libbsc/chan_alloc.c
@@ -260,6 +260,11 @@ struct gsm_lchan *lchan_alloc(struct gsm_bts *bts, enum gsm_chan_t type,
break;
case GSM_LCHAN_TCH_F:
lchan = _lc_find_bts(bts, GSM_PCHAN_TCH_F);
+ /* If we don't have TCH/F available, fall-back to TCH/H */
+ if (!lchan) {
+ lchan = _lc_find_bts(bts, GSM_PCHAN_TCH_H);
+ type = GSM_LCHAN_TCH_H;
+ }
break;
case GSM_LCHAN_TCH_H:
lchan =_lc_find_bts(bts, GSM_PCHAN_TCH_H);