[PATCH] libosmocore[master]: deprecate PLMN de-/coding functions incapable of 3-digit 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
Tue Apr 10 11:07:11 UTC 2018


Review at  https://gerrit.osmocom.org/7713

deprecate PLMN de-/coding functions incapable of 3-digit MNC with leading zeros

All our projects have seen patches to move to 3-digit MNC handling.

Furthermore, since our builds no longer break from deprecation warnings, I shall
no longer refrain from deprecating old API.

Change-Id: I55dfaf7ce74870de44120b26c42d45bb7b184341
---
M include/osmocom/gsm/gsm0808.h
M include/osmocom/gsm/gsm48.h
2 files changed, 12 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/13/7713/1

diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h
index bbde1a5..369d713 100644
--- a/include/osmocom/gsm/gsm0808.h
+++ b/include/osmocom/gsm/gsm0808.h
@@ -33,11 +33,12 @@
 struct gsm0808_cell_id_list2;
 
 struct msgb *gsm0808_create_layer3(struct msgb *msg_l3, uint16_t nc,
-				   uint16_t cc, int lac, uint16_t _ci);
+				   uint16_t cc, int lac, uint16_t _ci)
+	OSMO_DEPRECATED("Use gsm0808_create_layer3_2() instead, to not lose leading zeros in the MNC");
 struct msgb *gsm0808_create_layer3_aoip(const struct msgb *msg_l3, uint16_t nc,
 					uint16_t cc, int lac, uint16_t _ci,
-					const struct gsm0808_speech_codec_list
-					*scl);
+					const struct gsm0808_speech_codec_list *scl)
+	OSMO_DEPRECATED("Use gsm0808_create_layer3_2() instead, to not lose leading zeros in the MNC");
 struct msgb *gsm0808_create_layer3_2(const struct msgb *msg_l3, const struct osmo_cell_global_id *cell,
 				     const struct gsm0808_speech_codec_list *scl);
 struct msgb *gsm0808_create_reset(void);
diff --git a/include/osmocom/gsm/gsm48.h b/include/osmocom/gsm/gsm48.h
index 7c66a20..cfae83d 100644
--- a/include/osmocom/gsm/gsm48.h
+++ b/include/osmocom/gsm/gsm48.h
@@ -35,10 +35,12 @@
 const char *osmo_rai_name(const struct gprs_ra_id *rai);
 
 int gsm48_decode_lai(struct gsm48_loc_area_id *lai, uint16_t *mcc,
-		     uint16_t *mnc, uint16_t *lac);
+		     uint16_t *mnc, uint16_t *lac)
+	OSMO_DEPRECATED("Use gsm48_decode_lai2() instead, to not lose leading zeros in the MNC");
 void gsm48_decode_lai2(const struct gsm48_loc_area_id *lai, struct osmo_location_area_id *decoded);
 void gsm48_generate_lai(struct gsm48_loc_area_id *lai48, uint16_t mcc,
-			uint16_t mnc, uint16_t lac);
+			uint16_t mnc, uint16_t lac)
+	OSMO_DEPRECATED("Use gsm48_generate_lai2() instead, to not lose leading zeros in the MNC");
 void gsm48_generate_lai2(struct gsm48_loc_area_id *lai48, const struct osmo_location_area_id *lai);
 
 int gsm48_generate_mid_from_tmsi(uint8_t *buf, uint32_t tmsi);
@@ -57,5 +59,7 @@
 
 int gsm48_number_of_paging_subchannels(struct gsm48_control_channel_descr *chan_desc);
 
-void gsm48_mcc_mnc_to_bcd(uint8_t *bcd_dst, uint16_t mcc, uint16_t mnc);
-void gsm48_mcc_mnc_from_bcd(uint8_t *bcd_src, uint16_t *mcc, uint16_t *mnc);
+void gsm48_mcc_mnc_to_bcd(uint8_t *bcd_dst, uint16_t mcc, uint16_t mnc)
+	OSMO_DEPRECATED("Use osmo_plmn_to_bcd() instead, to not lose leading zeros in the MNC");
+void gsm48_mcc_mnc_from_bcd(uint8_t *bcd_src, uint16_t *mcc, uint16_t *mnc)
+	OSMO_DEPRECATED("Use osmo_plmn_from_bcd() instead, to not lose leading zeros in the MNC");

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I55dfaf7ce74870de44120b26c42d45bb7b184341
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list