summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-06-07 20:56:18 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-08-25 23:17:26 +0200
commit935eac12aa36ed1a351d5c50a6f216b0a8d3a544 (patch)
tree5c4fc0f0836fb424c16ac2f9dc05483d8f64c790
parent5135fbefd06920c5797c200c7f3b18f786e1ef2a (diff)
bsc: Introduce a local MSC type and forbid it from being selected
-rw-r--r--openbsc/include/openbsc/osmo_msc_data.h7
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_filter.c2
2 files changed, 9 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/osmo_msc_data.h b/openbsc/include/openbsc/osmo_msc_data.h
index 0f3f927..9edf880 100644
--- a/openbsc/include/openbsc/osmo_msc_data.h
+++ b/openbsc/include/openbsc/osmo_msc_data.h
@@ -35,12 +35,19 @@ struct gsm_audio_support {
ver : 7;
};
+enum {
+ MSC_CON_TYPE_NORMAL,
+ MSC_CON_TYPE_LOCAL,
+};
+
struct osmo_msc_data {
struct llist_head entry;
/* Back pointer */
struct gsm_network *network;
+ int type;
+
/* Connection data */
char *bsc_token;
int ping_timeout;
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_filter.c b/openbsc/src/osmo-bsc/osmo_bsc_filter.c
index 200360a..3bc2dfd 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_filter.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_filter.c
@@ -142,6 +142,8 @@ round_robin:
llist_for_each_entry(msc, &bsc->mscs, entry) {
if (!msc->msc_con->is_authenticated)
continue;
+ if (msc->type != MSC_CON_TYPE_NORMAL)
+ continue;
/* force round robin by moving it to the end */
llist_move_tail(&msc->entry, &bsc->mscs);