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-03-16 11:56:21 +0100
commit20fea245150b377ec97a3e56818cfbfc6e691097 (patch)
treef80a08be6cba80da909a145d6879bb6657b7b505 /openbsc/src/osmo-bsc/osmo_bsc_sccp.c
parent44e5dad3e25ed8aa200bd6229f2d4d94b8326123 (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 6ac300739..cc4eedfb8 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;