laforge has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36202?usp=email )
Change subject: umts_cell_id_name: Use 3-digit MCC and 2/3-digit MNC based on VTY config
......................................................................
umts_cell_id_name: Use 3-digit MCC and 2/3-digit MNC based on VTY config
Printing the PLMN 001-01 as "1-1" like the existing code is just weird,
and also doesn't differentiate between 2-digit and 3-digit MNC in the
output.
Change-Id: I015ad84a6f61b4420f6bfdaa60e8e1b53a71589c
---
M src/osmo-hnbgw/hnbgw.c
1 file changed, 19 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/02/36202/1
diff --git a/src/osmo-hnbgw/hnbgw.c b/src/osmo-hnbgw/hnbgw.c
index 695822e..8b00ecb 100644
--- a/src/osmo-hnbgw/hnbgw.c
+++ b/src/osmo-hnbgw/hnbgw.c
@@ -193,7 +193,12 @@
const char *umts_cell_id_name(const struct umts_cell_id *ucid)
{
- return talloc_asprintf(OTC_SELECT, "%u-%u-L%u-R%u-S%u-C%u", ucid->mcc,
ucid->mnc, ucid->lac, ucid->rac,
+ const char *fmtstr = "%03u-%02u-L%u-R%u-S%u-C%u";
+
+ if (g_hnbgw->config.plmn.mnc_3_digits)
+ fmtstr = "%03u-%03u-L%u-R%u-S%u-C%u";
+
+ return talloc_asprintf(OTC_SELECT, fmtstr, ucid->mcc, ucid->mnc, ucid->lac,
ucid->rac,
ucid->sac, ucid->cid);
}
--
To view, visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36202?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I015ad84a6f61b4420f6bfdaa60e8e1b53a71589c
Gerrit-Change-Number: 36202
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange