Change in osmo-bsc[master]: lchan_select: dont allow half rate EFR to be selected

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/.

dexter gerrit-no-reply at lists.osmocom.org
Tue Jan 22 08:32:51 UTC 2019


dexter has submitted this change and it was merged. ( https://gerrit.osmocom.org/12622 )

Change subject: lchan_select: dont allow half rate EFR to be selected
......................................................................

lchan_select: dont allow half rate EFR to be selected

The function lchan_select_by_chan_mode() is prone to select an half rate
lchan when EFR is used, even though EFR is not defined for half-rate.
Lets protect against that.

Change-Id: I961d9aaba81424053ab1dc04ce7799e716af4cd8
Related: OS#3503
---
M src/osmo-bsc/lchan_select.c
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Vadim Yanitskiy: Looks good to me, approved

Objections:
  Neels Hofmeyr: I would prefer this is not merged as is



diff --git a/src/osmo-bsc/lchan_select.c b/src/osmo-bsc/lchan_select.c
index f70ad4a..b63dcd2 100644
--- a/src/osmo-bsc/lchan_select.c
+++ b/src/osmo-bsc/lchan_select.c
@@ -136,8 +136,12 @@
 	case GSM48_CMODE_SIGN:
 		type = GSM_LCHAN_SDCCH;
 		break;
-	case GSM48_CMODE_SPEECH_V1:
 	case GSM48_CMODE_SPEECH_EFR:
+		/* EFR works over FR channels only */
+		if (!full_rate)
+			return NULL;
+		/* fall through */
+	case GSM48_CMODE_SPEECH_V1:
 	case GSM48_CMODE_SPEECH_AMR:
 		type = full_rate ? GSM_LCHAN_TCH_F : GSM_LCHAN_TCH_H;
 		break;

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I961d9aaba81424053ab1dc04ce7799e716af4cd8
Gerrit-Change-Number: 12622
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190122/ebf1f2c3/attachment.htm>


More information about the gerrit-log mailing list