Move global apn_list inside struct sgsn_instance
This way apns are managed by the lifcycle of the main global struct
sgsn_instance automatically.
Change-Id: I8cc8e540cfb64d0f130e9c0aaedf7b0835f8fe16
diff --git a/include/osmocom/sgsn/apn.h b/include/osmocom/sgsn/apn.h
index adf62e2..3dc7a70 100644
--- a/include/osmocom/sgsn/apn.h
+++ b/include/osmocom/sgsn/apn.h
@@ -6,8 +6,6 @@
#define GSM_APN_LENGTH 102
-extern struct llist_head sgsn_apn_ctxts;
-
struct apn_ctx {
struct llist_head list;
struct sgsn_ggsn_ctx *ggsn;
diff --git a/include/osmocom/sgsn/sgsn.h b/include/osmocom/sgsn/sgsn.h
index 7e78eee..0bc88a9 100644
--- a/include/osmocom/sgsn/sgsn.h
+++ b/include/osmocom/sgsn/sgsn.h
@@ -151,6 +151,7 @@
struct rate_ctr_group *rate_ctrs;
+ struct llist_head apn_list; /* list of struct sgsn_apn_ctx */
struct llist_head ggsn_list; /* list of struct sgsn_ggsn_ctx */
struct llist_head mme_list; /* list of struct sgsn_mme_ctx */