From patchwork Fri May 20 16:26:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gerrit-no-reply@lists.osmocom.org X-Patchwork-Id: 624556 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.osmocom.org (lists.osmocom.org [IPv6:2a01:4f8:191:444b::2:7]) by ozlabs.org (Postfix) with ESMTP id 3rBCxp1gyfz9t3w for ; Sat, 21 May 2016 02:26:54 +1000 (AEST) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id 958A66D4B; Fri, 20 May 2016 16:26:52 +0000 (UTC) X-Original-To: openbsc@lists.osmocom.org Delivered-To: openbsc@lists.osmocom.org Received: from 127.0.1.12 (unknown [127.0.1.12]) by lists.osmocom.org (Postfix) with ESMTPA id 6CE996D3E; Fri, 20 May 2016 16:26:51 +0000 (UTC) Date: Fri, 20 May 2016 16:26:51 +0000 From: Holger Freyther To: Vadim Yanitskiy X-Gerrit-MessageType: merged Subject: [MERGED] libosmocore[master]: gsm48: move to hex TMSI representation X-Gerrit-Change-Id: Ifd25365bfa3b4ee95b16979740c3229948ce17f2 X-Gerrit-ChangeURL: X-Gerrit-Commit: 78ad042f94afd5bf7de477ae634e9d2fdd9c9dc4 In-Reply-To: References: MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/2.12.2-31-gb331dbd-dirty X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Development of OpenBSC, OsmoBSC, OsmoNITB, OsmoCSCN" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: holger@freyther.de Errors-To: openbsc-bounces@lists.osmocom.org Sender: "OpenBSC" Message-Id: <20160520162652.958A66D4B@lists.osmocom.org> Holger Freyther has submitted this change and it was merged. Change subject: gsm48: move to hex TMSI representation ...................................................................... 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 Reviewed-by: Holger Freyther --- M src/gsm/gsm48.c 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index 8a46f76..d0e050b 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -458,11 +458,10 @@ 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: