[PATCH 1/5] sgsn: Make the free function internal

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Holger Freyther holger at freyther.de
Wed May 6 15:48:27 UTC 2015


From: Holger Hans Peter Freyther <holger at moiji-mobile.com>

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;
 
-- 
2.3.5




More information about the OpenBSC mailing list