Change in osmo-bsc[master]: lchan_fsm: make sure multi rate configuration is valid

dexter gerrit-no-reply at lists.osmocom.org
Fri Mar 1 17:06:27 UTC 2019


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/13094


Change subject: lchan_fsm: make sure multi rate configuration is valid
......................................................................

lchan_fsm: make sure multi rate configuration is valid

When gsm48_mr_cfg_from_gsm0808_sc_cfg() is used to generate the AMR
multirate configuration IE, make sure that lchan allocation fails in
cases where the multirate configuration IE can not be generated.

Change-Id: Icd3e5674b10b8ae223c0d13ae33fc9ae7e8a8a18
Depends: libosmocore I6fd7f4073b84093742c322752f2fd878d1071e15
Related: SYS#4470
---
M src/osmo-bsc/lchan_fsm.c
1 file changed, 6 insertions(+), 1 deletion(-)



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

diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index 8b4cf6d..0c54efb 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -539,7 +539,12 @@
 	}
 
 	if (info->chan_mode == GSM48_CMODE_SPEECH_AMR) {
-		gsm48_mr_cfg_from_gsm0808_sc_cfg(&mr_conf, info->s15_s0);
+		if (gsm48_mr_cfg_from_gsm0808_sc_cfg(&mr_conf, info->s15_s0) < 0) {
+			lchan_fail("Can not determine multirate configuration, S15-S0 (%04x) are ambiguous!\n",
+				   info->s15_s0);
+			return;
+		}
+
 		if (lchan_mr_config(lchan, &mr_conf) < 0) {
 			lchan_fail("Can not generate multirate configuration IE\n");
 			return;

-- 
To view, visit https://gerrit.osmocom.org/13094
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: Icd3e5674b10b8ae223c0d13ae33fc9ae7e8a8a18
Gerrit-Change-Number: 13094
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190301/7b4e31a7/attachment.html>


More information about the gerrit-log mailing list