aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2023-03-31 23:41:45 +0200
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-09-21 06:02:06 +0700
commitc7a0ca441a2154704cee043a1ca0fe15033af506 (patch)
tree0dc855bda9e732f951eed4f977d4b5b9496eb323
parent4d78884194c8cb20cd785c70b5833a8a96b07f8b (diff)
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
-rw-r--r--src/osmo-bsc/bts_ipaccess_nanobts.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c
index d99489b61..c690b4639 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts.c
@@ -217,11 +217,18 @@ static int sw_activ_rep(struct msgb *mb)
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);