From a91d15df7e1dd12b08e85910a51582ac257ce3e7 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 26 Mar 2010 09:58:40 +0100 Subject: bsc_msc_ip: Keep track of active connections so we could clear them. Keep track of SCCP connections so we can clear them when the MSC is going down. --- openbsc/include/openbsc/gsm_data.h | 3 +++ openbsc/src/bsc_msc_ip.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 88f8ab31b..6005dee6a 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -138,6 +138,9 @@ struct bss_sccp_connection_data { struct llist_head sccp_queue; unsigned int sccp_queue_size; + + /* Active connections */ + struct llist_head active_connections; }; #define GSM0808_T10_VALUE 6, 0 diff --git a/openbsc/src/bsc_msc_ip.c b/openbsc/src/bsc_msc_ip.c index e95f0050e..b8f2279a0 100644 --- a/openbsc/src/bsc_msc_ip.c +++ b/openbsc/src/bsc_msc_ip.c @@ -60,6 +60,7 @@ static const char *config_file = "openbsc.cfg"; static char *msc_address = "127.0.0.1"; static struct write_queue msc_queue; static struct in_addr local_addr; +static LLIST_HEAD(active_connections); extern int ipacc_rtp_direct; extern int bsc_bootstrap_network(int (*layer4)(struct gsm_network *, int, void *), const char *cfg_file); @@ -77,6 +78,7 @@ struct bss_sccp_connection_data *bss_sccp_create_data() INIT_LLIST_HEAD(&data->sccp_queue); INIT_LLIST_HEAD(&data->gsm_queue); + llist_add_tail(&data->active_connections, &active_connections); return data; } @@ -86,6 +88,7 @@ void bss_sccp_free_data(struct bss_sccp_connection_data *data) bsc_del_timer(&data->sccp_it); bsc_free_queued(data->sccp); bts_free_queued(data); + llist_del(&data->active_connections); talloc_free(data); } -- cgit v1.2.3