aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat/bsc_nat.c
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2017-09-08 03:49:26 +0200
committerDaniel Willmann <dwillmann@sysmocom.de>2018-01-30 18:59:28 +0100
commit63223f35e8fe25bbdd690ab9e91ac9474c538772 (patch)
tree1d66c81d4608a9c539f551cd065c4cc737c5cf4b /openbsc/src/osmo-bsc_nat/bsc_nat.c
parent3f734d27a556be774e86c07534593390095e3595 (diff)
osmo-bsc_nat: Modify nat init to work with multiple mgcp_configs
Diffstat (limited to 'openbsc/src/osmo-bsc_nat/bsc_nat.c')
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c
index e2471874f..89f99064d 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c
@@ -1615,12 +1615,6 @@ int main(int argc, char **argv)
return -4;
}
- nat->mgcp_cfg = mgcp_config_alloc();
- if (!nat->mgcp_cfg) {
- fprintf(stderr, "Failed to allocate MGCP cfg.\n");
- return -5;
- }
-
/* We need to add mode-set for amr codecs */
nat->sdp_ensure_amr_mode_set = 1;
@@ -1642,7 +1636,7 @@ int main(int argc, char **argv)
osmo_stats_init(tall_bsc_ctx);
/* init vty and parse */
- if (mgcp_parse_config(config_file, nat->mgcp_cfg, MGCP_BSC_NAT) < 0) {
+ if (mgcp_parse_config(config_file, &nat->mgcp_cfgs, MGCP_BSC_NAT) < 0) {
fprintf(stderr, "Failed to parse the config file: '%s'\n", config_file);
return -3;
}
@@ -1662,7 +1656,7 @@ int main(int argc, char **argv)
/*
* Setup the MGCP code..
*/
- if (bsc_mgcp_nat_init(nat) != 0)
+ if (bsc_mgcp_nat_init(nat, &nat->mgcp_cfgs) != 0)
return -4;
/* start control interface after reading config for