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-07 11:40:20 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-09-11 17:47:08 +0200
commit354c87cdfc4fefffeb04d5e554cc8618f19fad13 (patch)
treee05758e661b85e83b21c650d1edd482d901c983b /openbsc/src/osmo-bsc/osmo_bsc_sccp.c
parent8b902d74cf8b4e3c0fc2642ad144aa0dafd1ac63 (diff)
bsc: Select a MSC in a round-robin fashion
Select a MSC, add it to the back of the list after we have selected it.
Diffstat (limited to 'openbsc/src/osmo-bsc/osmo_bsc_sccp.c')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_sccp.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
index 1410cc67b..6b7256ba3 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
@@ -187,22 +187,19 @@ int bsc_queue_for_msc(struct osmo_bsc_sccp_con *conn, struct msgb *msg)
return 0;
}
-int bsc_create_new_connection(struct gsm_subscriber_connection *conn)
+int bsc_create_new_connection(struct gsm_subscriber_connection *conn,
+ struct osmo_msc_data *msc)
{
struct gsm_network *net;
- struct osmo_msc_data *msc;
struct osmo_bsc_sccp_con *bsc_con;
struct sccp_connection *sccp;
net = conn->bts->network;
- msc = osmo_msc_data_find(net, 0);
- if (!msc) {
- LOGP(DMSC, LOGL_ERROR, "Failed to select a MSC.\n");
- return -1;
- }
+ /* This should not trigger */
if (!msc->msc_con->is_authenticated) {
- LOGP(DMSC, LOGL_ERROR, "Not connected to a MSC. Not forwarding data.\n");
+ LOGP(DMSC, LOGL_ERROR,
+ "How did this happen? MSC is not connected. Dropping.\n");
return -1;
}