aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-07-24 14:57:35 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-07-24 14:57:35 +0200
commit0a7af40398a38978daefc69425031b8912d60d1e (patch)
tree8d59ffbc84ed03b058d591aed8651fd025b59d48
parent629a43a4c253895af52e293cc202516da4f1a6b1 (diff)
BTS codec pref legacy compat: allow all codecs per defaultneels/codec-pref
Legacy compat: we used to not check the BTS codec-pref settings upon assignment until we added checks for the BTS codec-pref in osmo-bsc 5bc43cd107597b78f701f77c7fd4cce8f923dce5, change-id I285234e9c81de74d9fb9907fca2c443b08537435, "codec_pref: check bts codec support". From that commit onwards, config setups without a 'codec-pref' potentially stop working (like all osmo-gsm-tester runs just did), because with no codec-pref settings, now only FR is permitted, while before the patch, we would allow any codecs as long as MSC and the overall BSC config agree on them. So, upon BTS initialization, enable all codecs. These get reset to a more fine grained selection IF a 'codec-pref' appears in the config file (see bsc_vty.c). Change-Id: I4650a1f8e350c6f74f48391f43ddfe771be01e1b
-rw-r--r--src/osmo-bsc/gsm_data.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c
index 0f062d2..6c8bdf3 100644
--- a/src/osmo-bsc/gsm_data.c
+++ b/src/osmo-bsc/gsm_data.c
@@ -757,6 +757,20 @@ struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, uint8_t bts_num)
INIT_LLIST_HEAD(&bts->abis_queue);
INIT_LLIST_HEAD(&bts->loc_list);
+ /* Legacy compat: we used to not check the BTS codec-pref settings upon assignment until we added
+ * checks for the BTS codec-pref in osmo-bsc 5bc43cd107597b78f701f77c7fd4cce8f923dce5, change-id
+ * I285234e9c81de74d9fb9907fca2c443b08537435, "codec_pref: check bts codec support". From that
+ * commit onwards, config setups without a 'codec-pref' potentially stop working, because with no
+ * codec-pref settings, now only FR is permitted, while before the patch, we would allow any
+ * codecs as long as MSC and the overall BSC config agree on them. So, upon BTS initialization,
+ * enable all codecs. These get reset to a more fine grained selection IF a 'codec-pref' appears
+ * in the config file (see bsc_vty.c). */
+ bts->codec = (struct bts_codec_conf){
+ hr = 1,
+ efr = 1,
+ amr = 1,
+ };
+
return bts;
}