summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2016-05-13 13:11:13 +0600
committerHolger Freyther <holger@freyther.de>2016-05-20 16:26:51 +0000
commit78ad042f94afd5bf7de477ae634e9d2fdd9c9dc4 (patch)
tree753bf982df596fca3f240bc634e5e7e602373911
parent2da9e11258588367f288e6abfa9ebcb50d11f456 (diff)
gsm48: move to hex TMSI representation
Previously, we traditionally displayed a TMSI in its integer representation, which is quite unusual in the telecom world. A TMSI is normally printed as a series of 8 hex digits. Review at https://gerrit.osmocom.org/57/ Change-Id: Ifd25365bfa3b4ee95b16979740c3229948ce17f2 Reviewed-on: https://gerrit.osmocom.org/57 Tested-by: Jenkins Builder Reviewed-by: Harald Welte <laforge@gnumonks.org> Reviewed-by: Holger Freyther <holger@freyther.de>
-rw-r--r--src/gsm/gsm48.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c
index 8a46f769..d0e050bb 100644
--- a/src/gsm/gsm48.c
+++ b/src/gsm/gsm48.c
@@ -458,11 +458,10 @@ int gsm48_mi_to_string(char *string, const int str_len, const uint8_t *mi,
case GSM_MI_TYPE_NONE:
break;
case GSM_MI_TYPE_TMSI:
- /* Table 10.5.4.3, reverse generate_mid_from_tmsi */
if (mi_len == GSM48_TMSI_LEN && mi[0] == (0xf0 | GSM_MI_TYPE_TMSI)) {
memcpy(&tmsi, &mi[1], 4);
tmsi = ntohl(tmsi);
- return snprintf(string, str_len, "%u", tmsi);
+ return snprintf(string, str_len, "0x%08X", tmsi);
}
break;
case GSM_MI_TYPE_IMSI: