diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2020-05-29 16:53:23 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-06-18 11:23:35 +0000 |
commit | b26a5a82dbbb8b24d9d1d5cbbf7bbfdf7e4df645 (patch) | |
tree | 484626201be46ef559edc7ad0777970cc8e0366b /src/gprs | |
parent | 7369d449f1446f598e9084712ddfa4a5bceb17ee (diff) |
use new osmo_mobile_identity API everywhere
Depends: If4f7be606e54cfa1c59084cf169785b1cbda5cf5 (libosmocore)
Change-Id: I4cacb10bac419633ca0c14f244f9903f7f517b49
Diffstat (limited to 'src/gprs')
-rw-r--r-- | src/gprs/gprs_gb_parse.c | 13 |
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); |