laforge has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmocom-bb/+/33317 )
Change subject: [untested] layer23: migrate away from deprecated gsm48_mi_to_string
......................................................................
[untested] layer23: migrate away from deprecated gsm48_mi_to_string
Migrate from deprecated gsm48_mi_to_string to osmo_mobile_identity
Change-Id: Ida67adaa61689c55505a89e1a1bebde041c91139
Depends: libosmocore.git If4f7be606e54cfa1c59084cf169785b1cbda5cf5
---
M src/host/layer23/src/misc/app_ccch_scan.c
1 file changed, 20 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/17/33317/1
diff --git a/src/host/layer23/src/misc/app_ccch_scan.c
b/src/host/layer23/src/misc/app_ccch_scan.c
index 7cbe267..e6aff82 100644
--- a/src/host/layer23/src/misc/app_ccch_scan.c
+++ b/src/host/layer23/src/misc/app_ccch_scan.c
@@ -261,6 +261,7 @@
{
struct gsm48_paging1 *pag;
int len1, len2, mi_type, tag;
+ struct osmo_mobile_identity mi;
char mi_string[GSM48_MI_SIZE];
/* is there enough room for the header + LV? */
@@ -279,7 +280,8 @@
}
if (mi_type != GSM_MI_TYPE_NONE) {
- gsm48_mi_to_string(mi_string, sizeof(mi_string), &pag->data[1], len1);
+ osmo_mobile_identity_decode(&mi, &pag->data[1], len1, false);
+ osmo_mobile_identity_to_str_buf(mi_string, sizeof(mi_string), &mi);
LOGP(DRR, LOGL_NOTICE, "Paging1: %s chan %s to %s M(%s) \n",
pag_print_mode(pag->pag_mode),
chan_need(pag->cneed1),
@@ -300,7 +302,8 @@
return -1;
}
- gsm48_mi_to_string(mi_string, sizeof(mi_string), &pag->data[2 + len1 + 2],
len2);
+ osmo_mobile_identity_decode(&mi, &pag->data[2 + len1 + 2], len2, false);
+ osmo_mobile_identity_to_str_buf(mi_string, sizeof(mi_string), &mi);
LOGP(DRR, LOGL_NOTICE, "Paging2: %s chan %s to %s M(%s) \n",
pag_print_mode(pag->pag_mode),
chan_need(pag->cneed2),
@@ -314,6 +317,7 @@
{
struct gsm48_paging2 *pag;
int tag, len, mi_type;
+ struct osmo_mobile_identity mi;
char mi_string[GSM48_MI_SIZE];
if (msgb_l3len(msg) < sizeof(*pag)) {
@@ -345,7 +349,8 @@
return -1;
}
- gsm48_mi_to_string(mi_string, sizeof(mi_string), &pag->data[2], len);
+ osmo_mobile_identity_decode(&mi, &pag->data[2], len, false);
+ osmo_mobile_identity_to_str_buf(mi_string, sizeof(mi_string), &mi);
LOGP(DRR, LOGL_NOTICE, "Paging3: %s chan %s to %s M(%s) \n",
pag_print_mode(pag->pag_mode),
"n/a ",
--
To view, visit
https://gerrit.osmocom.org/c/osmocom-bb/+/33317
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ida67adaa61689c55505a89e1a1bebde041c91139
Gerrit-Change-Number: 33317
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange