From 8ec4952557f9b4fff3792c3a57e6cf660fcf39e8 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 15 Aug 2011 15:53:00 +0200 Subject: bsc: Create a osmo_bsc_data and embed osmo_msc_data We want to have multiple MSCs but we also have some data that is only present on a per BSC basis. Right now the MSC data is not allocated with talloc, so we have some change in the talloc contexts. --- openbsc/include/openbsc/gsm_data.h | 2 +- openbsc/include/openbsc/gsm_data_shared.h | 3 ++- openbsc/include/openbsc/osmo_msc_data.h | 16 +++++++++++++--- 3 files changed, 16 insertions(+), 5 deletions(-) (limited to 'openbsc/include') diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 6c36599b0..c547cd7c8 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -285,7 +285,7 @@ struct gsm_network { int pag_any_tch; /* MSC data in case we are a true BSC */ - struct osmo_msc_data *msc_data; + struct osmo_bsc_data *bsc_data; /* subscriber related features */ int keep_subscr; diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 781e43aa0..c16a45ba0 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -19,7 +19,8 @@ #include -struct osmo_msc_data; +struct osmo_bsc_data; + struct osmo_bsc_sccp_con; struct gsm_sms_queue; diff --git a/openbsc/include/openbsc/osmo_msc_data.h b/openbsc/include/openbsc/osmo_msc_data.h index 59b75c303..6f9f3a2b0 100644 --- a/openbsc/include/openbsc/osmo_msc_data.h +++ b/openbsc/include/openbsc/osmo_msc_data.h @@ -57,20 +57,30 @@ struct osmo_msc_data { /* destinations */ struct llist_head dests; + /* ussd welcome text */ + char *ussd_welcome_txt; /* mgcp agent */ struct osmo_wqueue mgcp_agent; +}; + +/* + * Per BSC data. + */ +struct osmo_bsc_data { + struct gsm_network *network; + + /* msc configuration */ + struct osmo_msc_data msc; /* rf ctl related bits */ char *mid_call_txt; int mid_call_timeout; char *rf_ctrl_name; struct osmo_bsc_rf *rf_ctrl; - - /* ussd welcome text */ - char *ussd_welcome_txt; }; + int osmo_bsc_msc_init(struct gsm_network *network); int osmo_bsc_sccp_init(struct gsm_network *gsmnet); int msc_queue_write(struct bsc_msc_connection *conn, struct msgb *msg, int proto); -- cgit v1.2.3