diff options
author | Daniel Willmann <dwillmann@sysmocom.de> | 2017-02-28 18:25:46 +0100 |
---|---|---|
committer | Daniel Willmann <daniel@totalueberwachung.de> | 2018-01-25 16:48:25 +0100 |
commit | 2443aca27804ecbf52a1e593cf314a45a9cabfe3 (patch) | |
tree | e1bf3702b271ac07d27476af825c39c18dc5d3ce /openbsc/src | |
parent | 68785e6a52cdb313200bf690b3974b018b4fed0d (diff) |
osmo-bsc_nat: Change some functions to work with multiple MSC conns
Change-Id: Iab6f23f6f010f34876e37852cafa53e3a641478e
Ticket: SYS#3208
Sponsored-by: On-Waves ehf.
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/osmo-bsc_nat/bsc_nat.c | 6 | ||||
-rw-r--r-- | openbsc/src/osmo-bsc_nat/bsc_nat_utils.c | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c index 7aed9e6d4..3012b8a12 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c @@ -390,7 +390,11 @@ static void initialize_msc_if_needed(struct bsc_msc_connection *msc_con) static void send_id_get_response(struct bsc_msc_connection *msc_con) { - struct msgb *msg = bsc_msc_id_get_resp(0, nat->token, NULL, 0); + struct msc_config *conf; + struct msgb *msg; + + conf = msc_config_by_con(nat, msc_con); + msg = bsc_msc_id_get_resp(0, conf->token, NULL, 0); if (!msg) return; diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c b/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c index d13749912..51977f029 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c @@ -494,7 +494,12 @@ const char *bsc_con_type_to_string(int type) int bsc_nat_msc_is_connected(struct bsc_nat *nat) { - return nat->msc_con->is_connected; + struct msc_config *msc_conf; + llist_for_each_entry(msc_conf, &nat->msc_configs, entry) { + if (msc_conf->msc_con->is_connected) + return 1; + } + return 0; } static const int con_to_ctr[] = { |