jolly has submitted this change. (
https://gerrit.osmocom.org/c/osmo-bsc/+/35135?usp=email
)
Change subject: Only check for intersecting AMR codec support on matching TS rate
......................................................................
Only check for intersecting AMR codec support on matching TS rate
Only check for intersecting full rate AMR codec, if the BTS has at least
one full rate or dynamic time slot configured.
Only check for intersecting half rate AMR codec, if the BTS has at least
one half rate or dynamic time slot configured.
Related: OS#5926
Change-Id: Ia4a8e7f22dc652655ee7c5458624df8ae136dd95
---
M src/osmo-bsc/codec_pref.c
1 file changed, 36 insertions(+), 14 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
neels: Looks good to me, approved; Verified
diff --git a/src/osmo-bsc/codec_pref.c b/src/osmo-bsc/codec_pref.c
index 31b5215..454b00b 100644
--- a/src/osmo-bsc/codec_pref.c
+++ b/src/osmo-bsc/codec_pref.c
@@ -481,22 +481,28 @@
rc = -1;
}
- bts_gsm48_ie = (struct gsm48_multi_rate_conf *)&bts->mr_full.gsm48_ie;
- rc_rate = calc_amr_rate_intersection(NULL, &msc->amr_conf, bts_gsm48_ie);
- if (rc_rate < 0) {
- LOGP(DMSC, LOGL_FATAL,
- "network amr tch-f mode config of BTS %u does not intersect with amr-config
of MSC %u\n",
- bts->nr, msc->nr);
- rc = -1;
+ /* Full rate codec check, only if any full rate TS is configured. */
+ if (test_codec_support_bts_rate(bts, true)) {
+ bts_gsm48_ie = (struct gsm48_multi_rate_conf *)&bts->mr_full.gsm48_ie;
+ rc_rate = calc_amr_rate_intersection(NULL, &msc->amr_conf, bts_gsm48_ie);
+ if (rc_rate < 0) {
+ LOGP(DMSC, LOGL_FATAL,
+ "network amr tch-f mode config of BTS %u does not intersect with
amr-config of MSC %u\n",
+ bts->nr, msc->nr);
+ rc = -1;
+ }
}
- bts_gsm48_ie = (struct gsm48_multi_rate_conf *)&bts->mr_half.gsm48_ie;
- rc_rate = calc_amr_rate_intersection(NULL, &msc->amr_conf, bts_gsm48_ie);
- if (rc_rate < 0) {
- LOGP(DMSC, LOGL_FATAL,
- "network amr tch-h mode config of BTS %u does not intersect with amr-config
of MSC %u\n",
- bts->nr, msc->nr);
- rc = -1;
+ /* Half rate codec check, only if any half rate TS is configured. */
+ if (test_codec_support_bts_rate(bts, false)) {
+ bts_gsm48_ie = (struct gsm48_multi_rate_conf *)&bts->mr_half.gsm48_ie;
+ rc_rate = calc_amr_rate_intersection(NULL, &msc->amr_conf, bts_gsm48_ie);
+ if (rc_rate < 0) {
+ LOGP(DMSC, LOGL_FATAL,
+ "network amr tch-h mode config of BTS %u does not intersect with
amr-config of MSC %u\n",
+ bts->nr, msc->nr);
+ rc = -1;
+ }
}
}
}
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/35135?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ia4a8e7f22dc652655ee7c5458624df8ae136dd95
Gerrit-Change-Number: 35135
Gerrit-PatchSet: 2
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged