aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/libmgcp/mgcp_vty.c4
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c9
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat_vty.c1
3 files changed, 8 insertions, 6 deletions
diff --git a/openbsc/src/libmgcp/mgcp_vty.c b/openbsc/src/libmgcp/mgcp_vty.c
index 2a743527e..55377a83e 100644
--- a/openbsc/src/libmgcp/mgcp_vty.c
+++ b/openbsc/src/libmgcp/mgcp_vty.c
@@ -246,7 +246,7 @@ struct mgcp_config *mgcp_config_by_num(struct llist_head *configs, unsigned inde
}
DEFUN(show_mcgp, show_mgcp_cmd,
- "show mgcp <MGCP_NO> [stats]",
+ "show mgcp MGCP_NO [stats]",
SHOW_STR
"Display information about the MGCP Media Gateway\n"
"Include Statistics\n")
@@ -270,7 +270,7 @@ DEFUN(show_mcgp, show_mgcp_cmd,
DEFUN(cfg_mgcp,
cfg_mgcp_cmd,
- "mgcp [<MSC_NR>]",
+ "mgcp [MGCP_NR]",
"Configure the MGCP\n" "Identifier of the MGCP\n")
{
struct mgcp_config *mgcp;
diff --git a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
index 32e3f4f8e..848fcd126 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
@@ -485,8 +485,7 @@ free_stat:
talloc_free(stat);
}
-
-struct nat_sccp_connection *bsc_mgcp_find_con(struct bsc_nat *nat, int endpoint)
+struct nat_sccp_connection *bsc_mgcp_find_con(struct bsc_nat *nat, struct mgcp_config *mgcp, int endpoint)
{
struct nat_sccp_connection *con = NULL;
struct nat_sccp_connection *sccp;
@@ -496,6 +495,8 @@ struct nat_sccp_connection *bsc_mgcp_find_con(struct bsc_nat *nat, int endpoint)
continue;
if (sccp->msc_endp != endpoint)
continue;
+ if (sccp->mgcp_conf != mgcp)
+ continue;
con = sccp;
}
@@ -542,7 +543,7 @@ static int bsc_mgcp_policy_cb(struct mgcp_trunk_config *tcfg, int endpoint, int
}
bsc_endp->bsc = NULL;
- sccp = bsc_mgcp_find_con(nat, endpoint);
+ sccp = bsc_mgcp_find_con(nat, tcfg->cfg, endpoint);
if (!sccp) {
LOGP(DMGCP, LOGL_ERROR, "Did not find BSC for change on endpoint: 0x%x state: %d\n", endpoint, state);
@@ -647,7 +648,7 @@ static void free_chan_downstream(struct mgcp_config *mgcp_cfg, struct mgcp_endpo
/* if a CRCX failed... send a DLCX down the stream */
if (bsc_endp->transaction_state == MGCP_ENDP_CRCX) {
struct nat_sccp_connection *con;
- con = bsc_mgcp_find_con(bsc->nat, ENDPOINT_NUMBER(endp));
+ con = bsc_mgcp_find_con(bsc->nat, mgcp_cfg, ENDPOINT_NUMBER(endp));
if (!con) {
LOGP(DMGCP, LOGL_ERROR,
"No SCCP connection for endp 0x%x\n",
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
index 648b672ec..a315c73df 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
@@ -843,6 +843,7 @@ DEFUN(cfg_nat_default_msc,
"The MSC to route messages to by default\n" "MSC number\n")
{
_nat->default_msc = atoi(argv[0]);
+ return CMD_SUCCESS;
}
DEFUN(cfg_nat_sdp_amr_mode_set,