aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-03-31 11:57:38 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-12-01 03:37:43 +0100
commitc59308014c48d4d0d4159a3a30e9c3eb6039ab92 (patch)
treed37c7f8775dd4c951bd59081671a876b5a86176d
parentf367c3e633c19b3d206eb9a63e318aa9abf51ca0 (diff)
If requested TCH/H channel is not available, try assigning TCH/F
If MNCC application requests a half rate channel, the channel might not be available, due to different cell configuration, so the full rate channel is used.
-rw-r--r--src/libbsc/abis_rsl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c
index fbea70f80..de8207687 100644
--- a/src/libbsc/abis_rsl.c
+++ b/src/libbsc/abis_rsl.c
@@ -1385,6 +1385,12 @@ static int rsl_rx_chan_rqd(struct msgb *msg)
/* check availability / allocate channel */
lchan = lchan_alloc(bts, lctype, is_lu);
+ if (!lchan && (rqd_ref->ra & 0xf0) == 0x30) {
+ LOGP(DRSL, LOGL_NOTICE, "BTS %d CHAN RQD: no resources for %s 0x%x, retrying with %s\n",
+ msg->lchan->ts->trx->bts->nr, gsm_lchant_name(lctype), rqd_ref->ra, gsm_lchant_name(GSM_LCHAN_TCH_F));
+ lctype = GSM_LCHAN_TCH_F;
+ lchan = lchan_alloc(bts, lctype, is_lu);
+ }
if (!lchan) {
LOGP(DRSL, LOGL_NOTICE, "BTS %d CHAN RQD: no resources for %s 0x%x\n",
msg->lchan->ts->trx->bts->nr, gsm_lchant_name(lctype), rqd_ref->ra);
@@ -1889,6 +1895,11 @@ int rsl_ipacc_mdcx_to_rtpsock(struct gsm_lchan *lchan)
struct rtp_socket *rs = lchan->abis_ip.rtp_socket;
int rc;
+ if (!rs) {
+ LOGP(DRSL, LOGL_ERROR, "LCHAN has not rtp_socket\n");
+ return -EINVAL;
+ }
+
rc = rsl_ipacc_mdcx(lchan, ntohl(rs->rtp.sin_local.sin_addr.s_addr),
ntohs(rs->rtp.sin_local.sin_port),
/* FIXME: use RTP payload of bound socket, not BTS*/