From 354c87cdfc4fefffeb04d5e554cc8618f19fad13 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 7 Jun 2011 11:40:20 +0200 Subject: 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. --- openbsc/src/osmo-bsc/osmo_bsc_sccp.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'openbsc/src/osmo-bsc/osmo_bsc_sccp.c') 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; } -- cgit v1.2.3