From patchwork Tue May 26 10:53:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Kluchnikov X-Patchwork-Id: 476429 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.osmocom.org (tmp.osmocom.org [144.76.43.76]) by ozlabs.org (Postfix) with ESMTP id 47CF51402B4 for ; Tue, 26 May 2015 20:53:27 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=X1hLsRjn; dkim-atps=neutral Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id A78A35378; Tue, 26 May 2015 10:53:23 +0000 (UTC) X-Original-To: openbsc@lists.osmocom.org Delivered-To: openbsc@lists.osmocom.org Received: from mail-lb0-x234.google.com (mail-lb0-x234.google.com [IPv6:2a00:1450:4010:c04::234]) by lists.osmocom.org (Postfix) with ESMTP id AAEB95371 for ; Tue, 26 May 2015 10:53:21 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2so67308952lbb.3 for ; Tue, 26 May 2015 03:53:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=5g0SX1xXxK+sBalGa5moBbYWKvYBCxaBRbC/h2Yskns=; b=X1hLsRjnbeakF3ez90n+BJhb5RZ7l72qQfvpwzW+Eu2FT/2pLI2EKSl3jd9nhI41G6 vqXUxyUY1JzQH3FEtabckK5aiBla3BSZp2mJ7mUei7S+xHkyEUholBdxs9wqqQCDBhnm yTSm/ufPbtetK/03niXLYxpLhOk9v9Jdbk0NAsTy95tM65XIOAZrQYJ0gpfU30/7E4BI 00RKlaytLxEYq+As47isHXF9sDYvcFA3XfrzrFEqP50myECzh9FtfevGfsQVcJR2g2ht dqPhxzi6pWYX4ncupOZ6FPzV5kGGZ4cARt/+Y1V4zHGs3irTVHTJ7ecodnBleO3dlSI5 9vCA== X-Received: by 10.152.204.7 with SMTP id ku7mr22109380lac.38.1432637600874; Tue, 26 May 2015 03:53:20 -0700 (PDT) Received: from kluchnikov.neuronspace.ru ([77.50.56.50]) by mx.google.com with ESMTPSA id j9sm2837841laf.48.2015.05.26.03.53.19 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 May 2015 03:53:19 -0700 (PDT) From: Ivan Kluchnikov To: openbsc@lists.osmocom.org Subject: [PATCH] gsm_04_08: Use osmo_assert for transt->conn and conn only in case of paging succeeded Date: Tue, 26 May 2015 13:53:11 +0300 Message-Id: <1432637591-24130-1-git-send-email-kluchnikovi@gmail.com> X-Mailer: git-send-email 1.7.9.5 X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Development of the OpenBSC GSM base station controller List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openbsc-bounces@lists.osmocom.org Sender: "OpenBSC" setup_trig_pag_evt function can receive parameter conn = NULL, if T3113 expires. --- openbsc/src/libmsc/gsm_04_08.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 5609602..d45ae08 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -1389,13 +1389,12 @@ static int setup_trig_pag_evt(unsigned int hooknum, unsigned int event, struct gsm_subscriber_connection *conn = _conn; struct gsm_trans *transt = _transt; - OSMO_ASSERT(!transt->conn); - OSMO_ASSERT(conn); - /* check all tranactions (without lchan) for subscriber */ switch (event) { case GSM_PAGING_SUCCEEDED: DEBUGP(DCC, "Paging subscr %s succeeded!\n", transt->subscr->extension); + OSMO_ASSERT(!transt->conn); + OSMO_ASSERT(conn); /* Assign lchan */ transt->conn = conn; /* send SETUP request to called party */