pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30883 )
Change subject: Move struct sgsn_subscriber_pdp_data to gprs_subscriber.h ......................................................................
Move struct sgsn_subscriber_pdp_data to gprs_subscriber.h
The functions driving its lifcyecles are already in gprs_subscriber.c, and are used mainly by functions in the same file, hence move it to the related header to further shrink gprs_sgsn.h.
Change-Id: Iff7be91af130a3317d57d3649c17e3d5d2540e7a --- M include/osmocom/sgsn/gprs_sgsn.h M include/osmocom/sgsn/gprs_subscriber.h M tests/sgsn/sgsn_test.c 3 files changed, 16 insertions(+), 17 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/83/30883/1
diff --git a/include/osmocom/sgsn/gprs_sgsn.h b/include/osmocom/sgsn/gprs_sgsn.h index 6d51b30..8aaabfd 100644 --- a/include/osmocom/sgsn/gprs_sgsn.h +++ b/include/osmocom/sgsn/gprs_sgsn.h @@ -382,20 +382,6 @@ char imsi[OSMO_IMSI_BUF_SIZE]; };
-/* see GSM 09.02, 17.7.1, PDP-Context and GPRSSubscriptionData */ -/* see GSM 09.02, B.1, gprsSubscriptionData */ -struct sgsn_subscriber_pdp_data { - struct llist_head list; - - unsigned int context_id; - uint16_t pdp_type; - char apn_str[GSM_APN_LENGTH]; - uint8_t qos_subscribed[20]; - size_t qos_subscribed_len; - uint8_t pdp_charg[2]; - bool has_pdp_charg; -}; - #define SGSN_ERROR_CAUSE_NONE (-1)
#define LOGGSUBSCRP(level, subscr, fmt, args...) \ diff --git a/include/osmocom/sgsn/gprs_subscriber.h b/include/osmocom/sgsn/gprs_subscriber.h index 2e53bdf..d84a5d6 100644 --- a/include/osmocom/sgsn/gprs_subscriber.h +++ b/include/osmocom/sgsn/gprs_subscriber.h @@ -48,6 +48,22 @@ bool has_pdp_charg; };
+/* see GSM 09.02, 17.7.1, PDP-Context and GPRSSubscriptionData */ +/* see GSM 09.02, B.1, gprsSubscriptionData */ +struct sgsn_subscriber_pdp_data { + struct llist_head list; + + unsigned int context_id; + uint16_t pdp_type; + char apn_str[GSM_APN_LENGTH]; + uint8_t qos_subscribed[20]; + size_t qos_subscribed_len; + uint8_t pdp_charg[2]; + bool has_pdp_charg; +}; + +struct sgsn_subscriber_pdp_data *sgsn_subscriber_pdp_data_alloc(struct sgsn_subscriber_data *sdata); + struct gprs_subscr { struct llist_head entry; int use_count; diff --git a/tests/sgsn/sgsn_test.c b/tests/sgsn/sgsn_test.c index 7d3bde5..e7f820f 100644 --- a/tests/sgsn/sgsn_test.c +++ b/tests/sgsn/sgsn_test.c @@ -1435,9 +1435,6 @@ cleanup_test(); }
-struct sgsn_subscriber_pdp_data* sgsn_subscriber_pdp_data_alloc( - struct sgsn_subscriber_data *sdata); - static void test_ggsn_selection(void) { struct apn_ctx *actxs[4];