From patchwork Wed May 6 15:48:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Holger Freyther X-Patchwork-Id: 469005 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 EB3CD1402B5 for ; Thu, 7 May 2015 01:48:51 +1000 (AEST) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id B1AB95D1A; Wed, 6 May 2015 15:48:50 +0000 (UTC) X-Original-To: openbsc@lists.osmocom.org Delivered-To: openbsc@lists.osmocom.org Received: from gandharva.secretlabs.de (unknown [IPv6:2a01:4f8:161:8201::2:4]) by lists.osmocom.org (Postfix) with ESMTP id 79A915CD4 for ; Wed, 6 May 2015 15:48:46 +0000 (UTC) Received: from localhost.localdomain (ip5b41c286.dynamic.kabel-deutschland.de [91.65.194.134]) by gandharva.secretlabs.de (Postfix) with ESMTPSA id 2511E284DF for ; Wed, 6 May 2015 15:48:38 +0000 (UTC) From: Holger Freyther To: openbsc@lists.osmocom.org Subject: [PATCH 1/5] sgsn: Make the free function internal Date: Wed, 6 May 2015 17:48:27 +0200 Message-Id: <1430927311-7972-1-git-send-email-holger@freyther.de> X-Mailer: git-send-email 2.3.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" From: Holger Hans Peter Freyther All calls should and do go through the sgsn_mm_ctx_cleanup_free function. --- openbsc/include/openbsc/gprs_sgsn.h | 1 - openbsc/src/gprs/gprs_sgsn.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index 7a429cd..9e855f8 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -152,7 +152,6 @@ struct sgsn_mm_ctx *sgsn_mm_ctx_by_imsi(const char *imsi); /* Allocate a new SGSN MM context */ struct sgsn_mm_ctx *sgsn_mm_ctx_alloc(uint32_t tlli, const struct gprs_ra_id *raid); -void sgsn_mm_ctx_free(struct sgsn_mm_ctx *mm); void sgsn_mm_ctx_cleanup_free(struct sgsn_mm_ctx *ctx); struct sgsn_ggsn_ctx *sgsn_mm_ctx_find_ggsn_ctx(struct sgsn_mm_ctx *mmctx, diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c index 711540e..2f5d39e 100644 --- a/openbsc/src/gprs/gprs_sgsn.c +++ b/openbsc/src/gprs/gprs_sgsn.c @@ -183,7 +183,7 @@ struct sgsn_mm_ctx *sgsn_mm_ctx_alloc(uint32_t tlli, /* this is a hard _free_ function, it doesn't clean up the PDP contexts * in libgtp! */ -void sgsn_mm_ctx_free(struct sgsn_mm_ctx *mm) +static void sgsn_mm_ctx_free(struct sgsn_mm_ctx *mm) { struct sgsn_pdp_ctx *pdp, *pdp2;