Change in osmo-bts[master]: Feed the actual pchan type to bts_supports_cm()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Keith Whyte gerrit-no-reply at lists.osmocom.org
Mon Sep 10 13:21:04 UTC 2018


Keith Whyte has uploaded this change for review. ( https://gerrit.osmocom.org/10864


Change subject: Feed the actual pchan type to bts_supports_cm()
......................................................................

Feed the actual pchan type to bts_supports_cm()

In rsl_rx_mode_modif(), bts_supports_cm() should never
be fed with dynamic pchan kinds.
Feed instead the return value of ts_pchan() that is to say,
the actual pchan type.

Change-Id: I7f0c835b25289931bccf96e982ea5564c8be4192
---
M src/common/bts.c
M src/common/rsl.c
2 files changed, 5 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/64/10864/1

diff --git a/src/common/bts.c b/src/common/bts.c
index bec611c..55b7fa7 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -731,6 +731,8 @@
 			/* Invalid speech codec type => Not supported! */
 			return 0;
 		}
+	} else {
+		LOGP(DRSL, LOGL_DEBUG, "%s: Invalid pchan(%s)\n", __func__, gsm_pchan_name(pchan));
 	}
 
 	/* Check if the feature is supported by this BTS */
diff --git a/src/common/rsl.c b/src/common/rsl.c
index c6c00ea..451b54e 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1498,8 +1498,9 @@
 	cm = (struct rsl_ie_chan_mode *) TLVP_VAL(&tp, RSL_IE_CHAN_MODE);
 	lchan_tchmode_from_cmode(lchan, cm);
 
-	if (bts_supports_cm(lchan->ts->trx->bts, lchan->ts->pchan, lchan->tch_mode) != 1) {
-		LOGP(DRSL, LOGL_ERROR, "invalid mode/codec instructed by BSC, check BSC configuration.\n");
+	if (bts_supports_cm(lchan->ts->trx->bts, ts_pchan(lchan->ts), lchan->tch_mode) != 1) {
+		LOGP(DRSL, LOGL_ERROR, "BTS %d: invalid mode(%s)/codec(%s) instructed by BSC, check BSC configuration.\n",
+			lchan->ts->trx->bts->nr, gsm_pchan_name(lchan->ts->pchan), gsm48_chan_mode_name(lchan->tch_mode));
 		return rsl_tx_mode_modif_nack(lchan, RSL_ERR_SERV_OPT_UNAVAIL);
 	}
 

-- 
To view, visit https://gerrit.osmocom.org/10864
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f0c835b25289931bccf96e982ea5564c8be4192
Gerrit-Change-Number: 10864
Gerrit-PatchSet: 1
Gerrit-Owner: Keith Whyte <keith at rhizomatica.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180910/64aa8a47/attachment.htm>


More information about the gerrit-log mailing list