aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/osmo-bsc/osmo_bsc_sccp.c')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_sccp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
index b5ab67ff1..46ffd5760 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
@@ -195,7 +195,12 @@ int bsc_create_new_connection(struct gsm_subscriber_connection *conn)
struct sccp_connection *sccp;
net = conn->bts->network;
- msc = &net->bsc_data->msc;
+ msc = osmo_msc_data_find(net, 0);
+ if (!msc) {
+ LOGP(DMSC, LOGL_ERROR, "Failed to select a MSC.\n");
+ return -1;
+ }
+
if (!msc->msc_con->is_authenticated) {
LOGP(DMSC, LOGL_ERROR, "Not connected to a MSC. Not forwarding data.\n");
return -1;