diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-01-18 16:01:34 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-03-03 16:19:07 +0100 |
commit | f6672ab8b00e5b7fd71b4a4b050e91bff2ca2d6c (patch) | |
tree | 745da06ab2085b968a3b44cf020bf77eb8f8fcc8 /openbsc/src/libbsc | |
parent | 51273157fa18034349d6ac1395c6d43e80cc07c0 (diff) |
move subscriber conns list into struct gsm_network.
Replace the global sub_connections llist with gsm_network.subscr_conns.
Initialize and apply where applicable. Remove bsc_api_sub_connections().
Diffstat (limited to 'openbsc/src/libbsc')
-rw-r--r-- | openbsc/src/libbsc/bsc_api.c | 9 | ||||
-rw-r--r-- | openbsc/src/libbsc/net_init.c | 1 |
2 files changed, 4 insertions, 6 deletions
diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c index 504f044fb..f3f7b777a 100644 --- a/openbsc/src/libbsc/bsc_api.c +++ b/openbsc/src/libbsc/bsc_api.c @@ -242,8 +242,9 @@ static int handle_new_assignment(struct gsm_subscriber_connection *conn, int cha struct gsm_subscriber_connection *subscr_con_allocate(struct gsm_lchan *lchan) { struct gsm_subscriber_connection *conn; + struct gsm_network *network = lchan->ts->trx->bts->network; - conn = talloc_zero(lchan->ts->trx->bts->network, struct gsm_subscriber_connection); + conn = talloc_zero(network, struct gsm_subscriber_connection); if (!conn) return NULL; @@ -251,7 +252,7 @@ struct gsm_subscriber_connection *subscr_con_allocate(struct gsm_lchan *lchan) conn->lchan = lchan; conn->bts = lchan->ts->trx->bts; lchan->conn = conn; - llist_add_tail(&conn->entry, &sub_connections); + llist_add_tail(&conn->entry, &network->subscr_conns); return conn; } @@ -873,7 +874,3 @@ static __attribute__((constructor)) void on_dso_load_bsc(void) osmo_signal_register_handler(SS_LCHAN, bsc_handle_lchan_signal, NULL); } -struct llist_head *bsc_api_sub_connections(struct gsm_network *net) -{ - return &sub_connections; -} diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index 568a0b85e..3b033c7b6 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -71,6 +71,7 @@ struct gsm_network *gsm_network_init(uint16_t country_code, uint16_t network_cod INIT_LLIST_HEAD(&net->trans_list); INIT_LLIST_HEAD(&net->upqueue); INIT_LLIST_HEAD(&net->bts_list); + INIT_LLIST_HEAD(&net->subscr_conns); net->stats.chreq.total = osmo_counter_alloc("net.chreq.total"); net->stats.chreq.no_channel = osmo_counter_alloc("net.chreq.no_channel"); |