aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc/osmo_bsc_api.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-06-07 19:57:02 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-08-25 23:17:17 +0200
commit6bceb8a5b08a26fcacb8ef9f7f5c4cb3e58a1dd4 (patch)
treeac587215fee89eb8a198aa5ebcb79d5c84567864 /openbsc/src/osmo-bsc/osmo_bsc_api.c
parent4084e87af9a2238feef8a5d2d4f0aceb6434efbf (diff)
bsc: Move the finding of a MSC into the filter code
For responding to paging on the right link we will need to figure out if the msg is a paging response.
Diffstat (limited to 'openbsc/src/osmo-bsc/osmo_bsc_api.c')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_api.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_api.c b/openbsc/src/osmo-bsc/osmo_bsc_api.c
index 2d2b804f4..067ebabf5 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_api.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_api.c
@@ -81,25 +81,6 @@ static void bsc_cipher_mode_compl(struct gsm_subscriber_connection *conn,
queue_msg_or_return(resp);
}
-static struct osmo_msc_data *find_msc(struct gsm_subscriber_connection *conn,
- struct msgb *msg)
-{
- struct osmo_bsc_data *bsc;
- struct osmo_msc_data *msc;
-
- bsc = conn->bts->network->bsc_data;
- llist_for_each_entry(msc, &bsc->mscs, entry) {
- if (!msc->msc_con->is_authenticated)
- continue;
-
- /* force round robin by moving it to the end */
- llist_move_tail(&msc->entry, &bsc->mscs);
- return msc;
- }
-
- return NULL;
-}
-
/*
* Instruct to reserve data for a new connectiom, create the complete
* layer three message, send it to open the connection.
@@ -115,7 +96,7 @@ static int bsc_compl_l3(struct gsm_subscriber_connection *conn, struct msgb *msg
LOGP(DMSC, LOGL_INFO, "Tx MSC COMPL L3\n");
/* find the MSC link we want to use */
- msc = find_msc(conn, msg);
+ msc = bsc_find_msc(conn, msg);
if (!msc) {
LOGP(DMSC, LOGL_ERROR, "Failed to find a MSC for a connection.\n");
return -1;