aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-05-29 16:53:23 +0200
committerlaforge <laforge@osmocom.org>2020-06-18 11:23:35 +0000
commitb26a5a82dbbb8b24d9d1d5cbbf7bbfdf7e4df645 (patch)
tree484626201be46ef559edc7ad0777970cc8e0366b /src/gprs
parent7369d449f1446f598e9084712ddfa4a5bceb17ee (diff)
use new osmo_mobile_identity API everywhere
Diffstat (limited to 'src/gprs')
-rw-r--r--src/gprs/gprs_gb_parse.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gprs/gprs_gb_parse.c b/src/gprs/gprs_gb_parse.c
index 379674a91..e5de4d4c7 100644
--- a/src/gprs/gprs_gb_parse.c
+++ b/src/gprs/gprs_gb_parse.c
@@ -604,13 +604,12 @@ void gprs_gb_log_parse_context(int log_level,
}
if (parse_ctx->imsi) {
- char mi_buf[200];
- mi_buf[0] = '\0';
- gsm48_mi_to_string(mi_buf, sizeof(mi_buf),
- parse_ctx->imsi, parse_ctx->imsi_len);
- LOGPC(DGPRS, log_level, "%s IMSI %s",
- sep, mi_buf);
- sep = ",";
+ struct osmo_mobile_identity mi;
+ if (osmo_mobile_identity_decode(&mi, parse_ctx->imsi, parse_ctx->imsi_len, false) == 0
+ && mi.type == GSM_MI_TYPE_IMSI) {
+ LOGPC(DGPRS, log_level, "%s IMSI %s", sep, mi.imsi);
+ sep = ",";
+ }
}
if (parse_ctx->invalidate_tlli) {
LOGPC(DGPRS, log_level, "%s invalidate", sep);