aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-06-04 19:58:26 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-05-02 19:24:28 +0200
commit522676b9a8eb56d235b5a66f641bd1b0a918b676 (patch)
treee4ceca564c95e1f489a97ea00c26774813d756c0 /openbsc/src/osmo-bsc/osmo_bsc_sccp.c
parent1cd6c789cf4fcd5ac76e1ad72aac85dc987f191c (diff)
bsc: Prepare to have multiple MSC connections
We now have a list of MSCs but in the code we will try to access the MSC with the nr 0.
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;