aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2017-02-28 18:25:46 +0100
committerDaniel Willmann <dwillmann@sysmocom.de>2017-03-15 14:14:05 +0100
commit1aa60bd1f530e859ac9c2b2d853c4e9442e0ca2f (patch)
tree5e6f55f72353c0994b48be473f1b3cb0aa64d801 /openbsc
parentc2c327ed50c5ab17152228bacd028bc829850dae (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')
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat.c6
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat_utils.c7
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 378d6c522..7cb150c0e 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 a2446de56..18ec1dee9 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c
@@ -491,7 +491,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[] = {