mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
bsc: Make the MSC node a child of CONFIG_NODE
The VTY code calls the write function for nodes in the order of registration of the node and not in terms of hierachy of nodes. This means that the e1_input code is written before the MSC node that was the child of the network. Make the MSC_NODE a direct descendant of the CONFIG_NODE and avoid this issue.
This commit is contained in:
@@ -84,7 +84,7 @@ enum node_type bsc_vty_go_parent(struct vty *vty)
|
||||
}
|
||||
break;
|
||||
case MSC_NODE:
|
||||
vty->node = GSMNET_NODE;
|
||||
vty->node = CONFIG_NODE;
|
||||
break;
|
||||
case TRUNK_NODE:
|
||||
vty->node = MGCP_NODE;
|
||||
@@ -155,7 +155,7 @@ gDEFUN(ournode_exit,
|
||||
vty->index = NULL;
|
||||
break;
|
||||
case MSC_NODE:
|
||||
vty->node = GSMNET_NODE;
|
||||
vty->node = CONFIG_NODE;
|
||||
break;
|
||||
case TRUNK_NODE:
|
||||
vty->node = MGCP_NODE;
|
||||
|
@@ -53,31 +53,31 @@ static int config_write_msc(struct vty *vty)
|
||||
{
|
||||
struct osmo_msc_data *data = osmo_msc_data(vty);
|
||||
|
||||
vty_out(vty, " msc%s", VTY_NEWLINE);
|
||||
vty_out(vty, "msc%s", VTY_NEWLINE);
|
||||
if (data->bsc_token)
|
||||
vty_out(vty, " token %s%s", data->bsc_token, VTY_NEWLINE);
|
||||
vty_out(vty, " token %s%s", data->bsc_token, VTY_NEWLINE);
|
||||
if (data->core_ncc != -1)
|
||||
vty_out(vty, " core-mobile-network-code %d%s",
|
||||
vty_out(vty, " core-mobile-network-code %d%s",
|
||||
data->core_ncc, VTY_NEWLINE);
|
||||
if (data->core_mcc != -1)
|
||||
vty_out(vty, " core-mobile-country-code %d%s",
|
||||
vty_out(vty, " core-mobile-country-code %d%s",
|
||||
data->core_mcc, VTY_NEWLINE);
|
||||
vty_out(vty, " ip.access rtp-base %d%s", data->rtp_base, VTY_NEWLINE);
|
||||
vty_out(vty, " ip %s%s", data->msc_ip, VTY_NEWLINE);
|
||||
vty_out(vty, " port %d%s", data->msc_port, VTY_NEWLINE);
|
||||
vty_out(vty, " ip-dscp %d%s", data->msc_ip_dscp, VTY_NEWLINE);
|
||||
vty_out(vty, " timeout-ping %d%s", data->ping_timeout, VTY_NEWLINE);
|
||||
vty_out(vty, " timeout-pong %d%s", data->pong_timeout, VTY_NEWLINE);
|
||||
vty_out(vty, " ip.access rtp-base %d%s", data->rtp_base, VTY_NEWLINE);
|
||||
vty_out(vty, " ip %s%s", data->msc_ip, VTY_NEWLINE);
|
||||
vty_out(vty, " port %d%s", data->msc_port, VTY_NEWLINE);
|
||||
vty_out(vty, " ip-dscp %d%s", data->msc_ip_dscp, VTY_NEWLINE);
|
||||
vty_out(vty, " timeout-ping %d%s", data->ping_timeout, VTY_NEWLINE);
|
||||
vty_out(vty, " timeout-pong %d%s", data->pong_timeout, VTY_NEWLINE);
|
||||
if (data->mid_call_txt)
|
||||
vty_out(vty, " mid-call-text %s%s", data->mid_call_txt, VTY_NEWLINE);
|
||||
vty_out(vty, " mid-call-timeout %d%s", data->mid_call_timeout, VTY_NEWLINE);
|
||||
vty_out(vty, " mid-call-text %s%s", data->mid_call_txt, VTY_NEWLINE);
|
||||
vty_out(vty, " mid-call-timeout %d%s", data->mid_call_timeout, VTY_NEWLINE);
|
||||
if (data->ussd_welcome_txt)
|
||||
vty_out(vty, " bsc-welcome-text %s%s", data->ussd_welcome_txt, VTY_NEWLINE);
|
||||
vty_out(vty, " bsc-welcome-text %s%s", data->ussd_welcome_txt, VTY_NEWLINE);
|
||||
|
||||
if (data->audio_length != 0) {
|
||||
int i;
|
||||
|
||||
vty_out(vty, " codec-list ");
|
||||
vty_out(vty, " codec-list ");
|
||||
for (i = 0; i < data->audio_length; ++i) {
|
||||
if (i != 0)
|
||||
vty_out(vty, ", ");
|
||||
@@ -290,7 +290,7 @@ DEFUN(cfg_net_msc_welcome_ussd,
|
||||
|
||||
int bsc_vty_init_extra(void)
|
||||
{
|
||||
install_element(GSMNET_NODE, &cfg_net_msc_cmd);
|
||||
install_element(CONFIG_NODE, &cfg_net_msc_cmd);
|
||||
install_node(&msc_node, config_write_msc);
|
||||
install_default(MSC_NODE);
|
||||
install_element(MSC_NODE, &cfg_net_bsc_token_cmd);
|
||||
|
Reference in New Issue
Block a user