aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gprs_gmm.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-08-16 18:07:48 +0200
committerHarald Welte <laforge@gnumonks.org>2015-08-18 19:35:02 +0200
commitb9845f937e002acce44d15948d9770235cadc744 (patch)
treeccf60f41767a90797a77cc6a82197d7ccaf4fda2 /openbsc/src/gprs/gprs_gmm.c
parent6b39feedc78a2b23fb0d7f76e91b3fc631dffdc8 (diff)
GSM/GPRS 04.08: Don't print numeric mobile identity types
I guess none of our users knows what a mi_type=0x02 is, but most would know what an IMSI or a TMSI is. So let's use the newly introduced gsm48_mi_type_name() function to fix this.
Diffstat (limited to 'openbsc/src/gprs/gprs_gmm.c')
-rw-r--r--openbsc/src/gprs/gprs_gmm.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index d34aff1a3..cb3ff7361 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -402,7 +402,8 @@ static int gsm48_tx_gmm_id_req(struct sgsn_mm_ctx *mm, uint8_t id_type)
struct msgb *msg = gsm48_msgb_alloc();
struct gsm48_hdr *gh;
- LOGMMCTXP(LOGL_DEBUG, mm, "<- GPRS IDENTITY REQUEST: mi_type=%02x\n", id_type);
+ LOGMMCTXP(LOGL_DEBUG, mm, "<- GPRS IDENTITY REQUEST: mi_type=%s\n",
+ gsm48_mi_type_name(id_type));
mmctx2msgid(msg, mm);
@@ -774,14 +775,14 @@ static int gsm48_rx_gmm_id_resp(struct sgsn_mm_ctx *ctx, struct msgb *msg)
return -EINVAL;
}
- LOGMMCTXP(LOGL_DEBUG, ctx, "-> GMM IDENTITY RESPONSE: mi_type=0x%02x MI(%s)\n",
- mi_type, mi_string);
+ LOGMMCTXP(LOGL_DEBUG, ctx, "-> GMM IDENTITY RESPONSE: MI(%s)=%s\n",
+ gsm48_mi_type_name(mi_type), mi_string);
if (ctx->t3370_id_type == GSM_MI_TYPE_NONE) {
LOGMMCTXP(LOGL_NOTICE, ctx,
- "Got unexpected IDENTITY RESPONSE: mi_type=0x%02x MI(%s), "
+ "Got unexpected IDENTITY RESPONSE: MI(%s)=%s, "
"ignoring message\n",
- mi_type, mi_string);
+ gsm48_mi_type_name(mi_type), mi_string);
return -EINVAL;
}
@@ -924,7 +925,7 @@ static int gsm48_rx_gmm_att_req(struct sgsn_mm_ctx *ctx, struct msgb *msg,
break;
default:
LOGMMCTXP(LOGL_NOTICE, ctx, "Rejecting ATTACH REQUEST with "
- "MI type %u\n", mi_type);
+ "MI type %s\n", gsm48_mi_type_name(mi_type));
reject_cause = GMM_CAUSE_MS_ID_NOT_DERIVED;
goto rejected;
}