mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-02 21:13:44 +00:00
bsc: Introduce a local MSC type and forbid it from being selected
This commit is contained in:
@@ -35,12 +35,19 @@ struct gsm_audio_support {
|
|||||||
ver : 7;
|
ver : 7;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
MSC_CON_TYPE_NORMAL,
|
||||||
|
MSC_CON_TYPE_LOCAL,
|
||||||
|
};
|
||||||
|
|
||||||
struct osmo_msc_data {
|
struct osmo_msc_data {
|
||||||
struct llist_head entry;
|
struct llist_head entry;
|
||||||
|
|
||||||
/* Back pointer */
|
/* Back pointer */
|
||||||
struct gsm_network *network;
|
struct gsm_network *network;
|
||||||
|
|
||||||
|
int type;
|
||||||
|
|
||||||
/* Connection data */
|
/* Connection data */
|
||||||
char *bsc_token;
|
char *bsc_token;
|
||||||
int ping_timeout;
|
int ping_timeout;
|
||||||
|
|||||||
@@ -142,6 +142,8 @@ round_robin:
|
|||||||
llist_for_each_entry(msc, &bsc->mscs, entry) {
|
llist_for_each_entry(msc, &bsc->mscs, entry) {
|
||||||
if (!msc->msc_con->is_authenticated)
|
if (!msc->msc_con->is_authenticated)
|
||||||
continue;
|
continue;
|
||||||
|
if (msc->type != MSC_CON_TYPE_NORMAL)
|
||||||
|
continue;
|
||||||
|
|
||||||
/* force round robin by moving it to the end */
|
/* force round robin by moving it to the end */
|
||||||
llist_move_tail(&msc->entry, &bsc->mscs);
|
llist_move_tail(&msc->entry, &bsc->mscs);
|
||||||
|
|||||||
Reference in New Issue
Block a user