From 1e30a28e51b5e8a14b977233858f267f839197d5 Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Wed, 3 Dec 2014 09:28:24 +0100 Subject: msc: Add and use gsm_subscriber_group Currently every subcriber object directly refers to the gsm_network which contains a flag shared by every related subscriber (keep_subscr). This adds a dependency on gsm_network even if only the function defined in gsm_subscriber_base.c are used. This patch adds a new struct gsm_subscriber_group which contains the keep_subscr flag and a back reference to the network object. The latter is not dereferenced in gsm_subscriber_base.c, so it can safely be set to NULL when only that part of the gsm_subscriber API is being used. It also changes that API to use gsm_subscriber_group instead of gsm_network parameters. Since there are some places where a pointer to the gsm_network is needed but where only a gsm_subscriber is available, a 'net' back pointer is added to the group struct, too. Nevertheless subscr group and network could be separated completely, but this is not the topic of this commit. Sponsored-by: On-Waves ehf --- openbsc/src/osmo-nitb/bsc_hack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbsc/src/osmo-nitb/bsc_hack.c') diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c index 031cb994d..753fd88cc 100644 --- a/openbsc/src/osmo-nitb/bsc_hack.c +++ b/openbsc/src/osmo-nitb/bsc_hack.c @@ -228,7 +228,7 @@ static void db_sync_timer_cb(void *data) static void subscr_expire_cb(void *data) { - subscr_expire(bsc_gsmnet); + subscr_expire(bsc_gsmnet->subscr_group); osmo_timer_schedule(&bsc_gsmnet->subscr_expire_timer, EXPIRE_INTERVAL); } -- cgit v1.2.3