aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/osmo_bsc_filter.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-01-28 02:45:46 +0100
committerHarald Welte <laforge@gnumonks.org>2018-02-19 08:20:35 +0000
commit519c7e1d428bfba728a76885c9c5394185a6497d (patch)
treefb802b82931eba0351c29cdeea8cf5054f4180a8 /src/osmo-bsc/osmo_bsc_filter.c
parentc1db52f1326bd136862ff4a789fe1be27556658f (diff)
Structural reform: Get rid of osmo_bsc_sccp_con
There was always a 1:1 correspondence between gsm_subscriber_connection and osmo_bsc_sccp_con, so there's really no point in having two separate dynamically allocated data structures with pointers back and forth and another linked list around. Let's merge osmo_bsc_sccp_con into gsm_subscriber_connection for simplicity. The resulting code might not be elegant in places, but I've tried to do only the most simple changes in this patch, while further simplifications can be done in later subsequent patches. As a side-effect, this patch also fixes lchan clearing if the MSC (or the local SCCP provider) hard-disconnects the SCCP connection. Change-Id: Idd2b733477ee90d24dec369755a00f1c39c93f39
Diffstat (limited to 'src/osmo-bsc/osmo_bsc_filter.c')
-rw-r--r--src/osmo-bsc/osmo_bsc_filter.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/osmo-bsc/osmo_bsc_filter.c b/src/osmo-bsc/osmo_bsc_filter.c
index 5399b7aee..c1f3e80a6 100644
--- a/src/osmo-bsc/osmo_bsc_filter.c
+++ b/src/osmo-bsc/osmo_bsc_filter.c
@@ -54,7 +54,7 @@ static void handle_lu_request(struct gsm_subscriber_connection *conn,
if (memcmp(&lai, &lu->lai, sizeof(lai)) != 0) {
LOGP(DMSC, LOGL_DEBUG, "Marking con for welcome USSD.\n");
- conn->sccp_con->new_subscriber = 1;
+ conn->new_subscriber = 1;
}
}
@@ -234,15 +234,7 @@ int bsc_scan_bts_msg(struct gsm_subscriber_connection *conn, struct msgb *msg)
static int send_welcome_ussd(struct gsm_subscriber_connection *conn)
{
- struct osmo_bsc_sccp_con *bsc_con;
-
- bsc_con = conn->sccp_con;
- if (!bsc_con) {
- LOGP(DMSC, LOGL_DEBUG, "No SCCP connection associated.\n");
- return 0;
- }
-
- if (!bsc_con->msc->ussd_welcome_txt) {
+ if (!conn->sccp.msc->ussd_welcome_txt) {
LOGP(DMSC, LOGL_DEBUG, "No USSD Welcome text defined.\n");
return 0;
}
@@ -252,7 +244,7 @@ static int send_welcome_ussd(struct gsm_subscriber_connection *conn)
int bsc_send_welcome_ussd(struct gsm_subscriber_connection *conn)
{
- bsc_send_ussd_notify(conn, 1, conn->sccp_con->msc->ussd_welcome_txt);
+ bsc_send_ussd_notify(conn, 1, conn->sccp.msc->ussd_welcome_txt);
bsc_send_ussd_release_complete(conn);
return 0;
@@ -362,7 +354,7 @@ int bsc_scan_msc_msg(struct gsm_subscriber_connection *conn, struct msgb *msg)
mtype = gsm48_hdr_msg_type(gh);
net = bts->network;
- msc = conn->sccp_con->msc;
+ msc = conn->sccp.msc;
if (mtype == GSM48_MT_MM_LOC_UPD_ACCEPT) {
if (has_core_identity(msc)) {
@@ -375,7 +367,7 @@ int bsc_scan_msc_msg(struct gsm_subscriber_connection *conn, struct msgb *msg)
}
}
- if (conn->sccp_con->new_subscriber)
+ if (conn->new_subscriber)
return send_welcome_ussd(conn);
return 0;
} else if (mtype == GSM48_MT_MM_INFO) {