This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Vadim Yanitskiy gerrit-no-reply at lists.osmocom.orgVadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/18618 ) Change subject: abis_nm: finally handle BTS_TYPE_VARIANT, match BTS type ...................................................................... abis_nm: finally handle BTS_TYPE_VARIANT, match BTS type Change-Id: I344afccdb82f62a7d483b57597d08f028f88bdc9 --- M src/osmo-bsc/abis_nm.c 1 file changed, 21 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/18/18618/1 diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index d1c4046..95c823f 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -518,11 +518,31 @@ return res; } +static void handle_attr_variant(const struct gsm_bts *bts, const char *variant) +{ + int type = str2btstype(variant); + if (type < 0) { + LOGP(DNM, LOGL_ERROR, "BTS%u reported unknown variant '%s' " + "(expected '%s')\n", bts->nr, variant, + btstype2str(bts->type)); + return; + } + + if (type != bts->type) { + LOGP(DNM, LOGL_ERROR, "BTS%u reported unexpected variant '%s' " + "(expected '%s'), check your configuration!\n", bts->nr, + btstype2str(type), btstype2str(bts->type)); + return; + } + + LOGP(DNM, LOGL_INFO, "BTS%u reported variant '%s'\n", bts->nr, variant); +} + static inline bool handle_attr(const struct gsm_bts *bts, enum bts_attribute id, uint8_t *val, uint8_t len) { switch (id) { case BTS_TYPE_VARIANT: - LOGP(DNM, LOGL_NOTICE, "BTS%u reported variant: %s\n", bts->nr, val); + handle_attr_variant(bts, (const char *) val); break; case BTS_SUB_MODEL: LOGP(DNM, LOGL_NOTICE, "BTS%u reported submodel: %s\n", bts->nr, val); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/18618 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I344afccdb82f62a7d483b57597d08f028f88bdc9 Gerrit-Change-Number: 18618 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy <vyanitskiy at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200530/6ab787d1/attachment.htm>