[MERGED] osmo-iuh[master]: cosmetic: use osmo_plmn_id instead of mcc, mnc

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/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Mar 22 04:12:39 UTC 2018


Neels Hofmeyr has submitted this change and it was merged.

Change subject: cosmetic: use osmo_plmn_id instead of mcc,mnc
......................................................................


cosmetic: use osmo_plmn_id instead of mcc,mnc

It's cosmetic since the MCC and MNC in the PLMN aren't actually used,
currently. It makes sense to do it properly anyway, while I'm still in the
3-digit MNC topic, for the future.

Change-Id: I29ebcddd45fe3079f8883589a83cc7216a535475
---
M src/iu_client.c
1 file changed, 2 insertions(+), 4 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/iu_client.c b/src/iu_client.c
index 0f89515..4aecfec 100644
--- a/src/iu_client.c
+++ b/src/iu_client.c
@@ -42,8 +42,7 @@
  * PLMN identity is a BCD representation of the MCC and MNC.
  * See iu_grnc_id_parse(). */
 struct iu_grnc_id {
-	uint16_t mcc;
-	uint16_t mnc;
+	struct osmo_plmn_id plmn;
 	uint16_t rnc_id;
 };
 
@@ -310,8 +309,7 @@
 		       " should be 3, is %d\n", src->pLMNidentity.size);
 		return -1;
 	}
-	gsm48_mcc_mnc_from_bcd(&src->pLMNidentity.buf[0],
-			       &dst->mcc, &dst->mnc);
+	osmo_plmn_from_bcd(&src->pLMNidentity.buf[0], &dst->plmn);
 	dst->rnc_id = (uint16_t)src->rNC_ID;
 	return 0;
 }

-- 
To view, visit https://gerrit.osmocom.org/7413
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I29ebcddd45fe3079f8883589a83cc7216a535475
Gerrit-PatchSet: 1
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list