diff options
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/libbsc/bsc_api.c | 10 | ||||
-rw-r--r-- | openbsc/src/libbsc/net_init.c | 1 | ||||
-rw-r--r-- | openbsc/src/osmo-bsc/osmo_bsc_ctrl.c | 2 |
3 files changed, 5 insertions, 8 deletions
diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c index 8c830a3fc..f42598a7b 100644 --- a/openbsc/src/libbsc/bsc_api.c +++ b/openbsc/src/libbsc/bsc_api.c @@ -39,7 +39,6 @@ #define GSM0808_T10_VALUE 6, 0 -static LLIST_HEAD(sub_connections); static void rll_ind_cb(struct gsm_lchan *, uint8_t, void *, enum bsc_rllr_ind); static void send_sapi_reject(struct gsm_subscriber_connection *conn, int link_id); @@ -242,15 +241,16 @@ 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 *net = lchan->ts->trx->bts->network; - conn = talloc_zero(lchan->ts->trx->bts->network, struct gsm_subscriber_connection); + conn = talloc_zero(net, struct gsm_subscriber_connection); if (!conn) return NULL; conn->lchan = lchan; conn->bts = lchan->ts->trx->bts; lchan->conn = conn; - llist_add_tail(&conn->entry, &sub_connections); + llist_add_tail(&conn->entry, &net->subscr_conns); return conn; } @@ -876,7 +876,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 65419ae8f..e01ba8025 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -79,6 +79,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); /* init statistics */ net->bsc_ctrs = rate_ctr_group_alloc(net, &bsc_ctrg_desc, 0); diff --git a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c index 72f80edb7..3010b5591 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c @@ -583,7 +583,7 @@ static int set_net_ussd_notify(struct ctrl_cmd *cmd, void *data) alert = atoi(alert_str); net = cmd->node; - llist_for_each_entry(conn, bsc_api_sub_connections(net), entry) { + llist_for_each_entry(conn, &net->subscr_conns, entry) { if (!conn->sccp_con) continue; |