aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gprs_sgsn.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-02-03 19:53:15 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-02-06 10:00:03 +0100
commitf345612654720c63e29c75c0689e6955da478059 (patch)
tree397101bb9a035e672960d36672d33f48806d1a51 /openbsc/src/gprs/gprs_sgsn.c
parentcb1db8b6d5277a52ed553925d301bfdc514bb77c (diff)
sgsn: Add sgsn_ggsn_ctx_free function
This function will be needed for testing, since the leak check would fail if the GGSN context are not cleaned up after use. Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src/gprs/gprs_sgsn.c')
-rw-r--r--openbsc/src/gprs/gprs_sgsn.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c
index 54fe15cb1..85f3381c3 100644
--- a/openbsc/src/gprs/gprs_sgsn.c
+++ b/openbsc/src/gprs/gprs_sgsn.c
@@ -352,6 +352,12 @@ struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_alloc(uint32_t id)
return ggc;
}
+void sgsn_ggsn_ctx_free(struct sgsn_ggsn_ctx *ggc)
+{
+ llist_del(&ggc->list);
+ talloc_free(ggc);
+}
+
struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_by_id(uint32_t id)
{
struct sgsn_ggsn_ctx *ggc;