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.
This commit is contained in:
Harald Welte 2014-05-18 22:23:26 +02:00
parent ec75798644
commit a4c63b0cdb
1 changed files with 5 additions and 0 deletions

View File

@ -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);