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>2011-08-25 23:16:47 +0200
commitdeafac1ad0b3d49ebd5fb1c369efe3db9ddc5b19 (patch)
tree9f89fc53d84caa974ee3b29f68d28dfe5c88268d /openbsc/src/osmo-bsc/osmo_bsc_sccp.c
parentddb93a6e5eaf62c7cfb8339fc3e04bf56a1bedd8 (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;