osmith has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-bsc/+/27972 )
Change subject: abis_nm: add bts model features to reported ones
......................................................................
abis_nm: add bts model features to reported ones
As pointed out in code review, for nanobts we need to be able to combine
the reported features with a list of features we assume that the bts
model supports. This is because the enum of features is based on what
nanobts is able to report, but was extended for osmo-bts.
Related: SYS#5922, OS#5538
Change-Id: I7bdbf28c148877275048e070dce7f503ca5e6226
---
M contrib/jenkins.sh
M src/osmo-bsc/abis_nm.c
2 files changed, 16 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/72/27972/1
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 53b30bf..4380f16 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -28,7 +28,9 @@
verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
# Check for wrong use of osmo_bts_has_feature (OS#5538)
-bts_features_wrong_use="$(grep -r -n
'osmo_bts_has_feature.*->model->features' | grep -v
'jenkins.sh')" || true
+bts_features_wrong_use="$(grep -r -n
'osmo_bts_has_feature.*->model->features' \
+ | grep -v 'jenkins.sh' \
+ | grep -v 'intentional check against bts model')" || true
if [ -n "$bts_features_wrong_use" ]; then
set +x
echo
diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c
index 62f62b6..8c8b19d 100644
--- a/src/osmo-bsc/abis_nm.c
+++ b/src/osmo-bsc/abis_nm.c
@@ -613,6 +613,19 @@
LOGPMO(&bts->mo, DNM, LOGL_NOTICE, "Get Attributes Response: feature
'%s' is"
" supported\n", osmo_bts_features_name(i));
}
+
+ /* Add features from the BTS model: nanobts may support more
+ * features than it reports, since we extend the enum of
+ * features for osmo-bts. */
+ for (i = 0; i < _NUM_BTS_FEAT; i++) {
+ if (!osmo_bts_has_feature(&bts->model->features, i) || /* intentional check
against bts model */
+ osmo_bts_has_feature(&bts->features, i))
+ continue;
+
+ LOGPMO(&bts->mo, DNM, LOGL_NOTICE, "Get Attributes Response: feature
'%s' is assumed to be"
+ " supported\n", osmo_bts_features_name(i));
+ osmo_bts_set_feature(&bts->features, i);
+ }
}
/* Parse Attribute Response Info content for 3GPP TS 52.021 §9.4.28 Manufacturer
Dependent State */
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/27972
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I7bdbf28c148877275048e070dce7f503ca5e6226
Gerrit-Change-Number: 27972
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange