From patchwork Fri May 20 19:22:09 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: 624613 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by ozlabs.org (Postfix) with ESMTP id 3rBHr44sQbz9t5g for ; Sat, 21 May 2016 05:22:12 +1000 (AEST) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id B263A6059; Fri, 20 May 2016 19:22:10 +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 7C349604A; Fri, 20 May 2016 19:22:09 +0000 (UTC) Date: Fri, 20 May 2016 19:22:09 +0000 From: Holger Freyther X-Gerrit-MessageType: newpatchset Subject: [PATCH] libosmocore[master]: Revert "gsm48: move to hex TMSI representation" X-Gerrit-Change-Id: I2f61e626f2f9088b492e1b643c3dcc9bce77d52b X-Gerrit-ChangeURL: X-Gerrit-Commit: 34d820a5de49fbb6f0d4f7a5f575f8a3cc7b33bc 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: <20160520192210.B263A6059@lists.osmocom.org> Revert "gsm48: move to hex TMSI representation" This is a "flag" day change. Old OpenBSC break with new libosmocore because suddenly there is the 0x in front. I am afraid we need to find a better solution here. I think we will need to create a gsm48_mi_to_string variant that takes a mode parameter to enable the TMSI mode and deprecate the old method. Right now we should not break old versions of OpenBSC. This reverts commit 78ad042f94afd5bf7de477ae634e9d2fdd9c9dc4. Change-Id: I2f61e626f2f9088b492e1b643c3dcc9bce77d52b --- M src/gsm/gsm48.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/86/86/2 diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index d0e050b..8a46f76 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -458,10 +458,11 @@ 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, "0x%08X", tmsi); + return snprintf(string, str_len, "%u", tmsi); } break; case GSM_MI_TYPE_IMSI: