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.
This commit is contained in:
Holger Hans Peter Freyther
2010-03-26 09:58:40 +01:00
parent 3368e2a3d1
commit a91d15df7e
2 changed files with 6 additions and 0 deletions

View File

@@ -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

View File

@@ -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);
}