dexter has uploaded this change for review. ( 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, 4 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/22/12622/1

diff --git a/src/osmo-bsc/lchan_select.c b/src/osmo-bsc/lchan_select.c
index f70ad4a..0e22448 100644
--- a/src/osmo-bsc/lchan_select.c
+++ b/src/osmo-bsc/lchan_select.c
@@ -136,8 +136,11 @@
        case GSM48_CMODE_SIGN:
                type = GSM_LCHAN_SDCCH;
                break;
-       case GSM48_CMODE_SPEECH_V1:
        case GSM48_CMODE_SPEECH_EFR:
+               /* There is no full-rate EFR specified! */
+               if (!full_rate)
+                       return NULL;
+       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: newchange
Gerrit-Change-Id: I961d9aaba81424053ab1dc04ce7799e716af4cd8
Gerrit-Change-Number: 12622
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pma...@sysmocom.de>

Reply via email to