laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34472?usp=email )
(
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: oml: ipacc: print all supported versions of MOs
......................................................................
oml: ipacc: print all supported versions of MOs
The first byte is the default version, the other bytes describe the
optional other versions supported by the MO. Print them all.
Change-Id: I01da4883cf59101ddaef575979519ac48fcf54b0
---
M src/osmo-bsc/bts_ipaccess_nanobts.c
1 file changed, 22 insertions(+), 3 deletions(-)
Approvals:
dexter: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c
index d99489b..c690b46 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts.c
@@ -217,11 +217,18 @@
mo->ipaccess.obj_version = 0; /* implicit default */
if (TLVP_PRES_LEN(&tp, NM_ATT_IPACC_OBJ_VERSION, 1)) {
+ const uint8_t *versions = TLVP_VAL(&tp, NM_ATT_IPACC_OBJ_VERSION);
+ char buf[256];
+ struct osmo_strbuf sb = { .buf = buf, .len = sizeof(buf) };
+
/* nanoBTS may report several Object Versions; the first one will
* be used by default unless requested explicitly before OPSTARTing. */
- mo->ipaccess.obj_version = *TLVP_VAL(&tp, NM_ATT_IPACC_OBJ_VERSION);
- LOGPFOH(DNM, LOGL_INFO, foh, "IPA Object Version is %u (default)\n",
- mo->ipaccess.obj_version);
+ mo->ipaccess.obj_version = versions[0];
+
+ OSMO_STRBUF_PRINTF(sb, "%u (default)", versions[0]);
+ for (uint16_t i = 1; i < TLVP_LEN(&tp, NM_ATT_IPACC_OBJ_VERSION); i++)
+ OSMO_STRBUF_PRINTF(sb, ", %u", versions[i]);
+ LOGPFOH(DNM, LOGL_INFO, foh, "IPA Object Versions supported: %s\n", buf);
}
osmo_fsm_inst_dispatch(mo->fi, NM_EV_SW_ACT_REP, NULL);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34472?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: I01da4883cf59101ddaef575979519ac48fcf54b0
Gerrit-Change-Number: 34472
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged