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

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Mar 19 13:29:11 UTC 2019


Harald Welte has submitted this change and it was merged. ( 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(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



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: merged
Gerrit-Change-Id: Icd3e5674b10b8ae223c0d13ae33fc9ae7e8a8a18
Gerrit-Change-Number: 13094
Gerrit-PatchSet: 10
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190319/1d3fef19/attachment.html>


More information about the gerrit-log mailing list