osmux: save specific osmux configuration options if osmux is enabled

Just like other options do, to avoid polluting the configuration file
with unused options if osmux is disabled.
This commit is contained in:
Pablo Neira Ayuso
2014-08-29 15:24:00 +02:00
committed by Pablo Neira Ayuso
parent 9224010859
commit fcec6d85d0

View File

@@ -133,13 +133,14 @@ static int config_write_mgcp(struct vty *vty)
vty_out(vty, " transcoder-remote-base %u%s", g_cfg->transcoder_remote_base, VTY_NEWLINE);
vty_out(vty, " osmux %s%s",
g_cfg->osmux == 1 ? "on" : "off", VTY_NEWLINE);
vty_out(vty, " osmux batch-factor %d%s",
g_cfg->osmux_batch, VTY_NEWLINE);
vty_out(vty, " osmux batch-size %u%s",
g_cfg->osmux_batch_size, VTY_NEWLINE);
vty_out(vty, " osmux port %u%s",
g_cfg->osmux_port, VTY_NEWLINE);
if (g_cfg->osmux) {
vty_out(vty, " osmux batch-factor %d%s",
g_cfg->osmux_batch, VTY_NEWLINE);
vty_out(vty, " osmux batch-size %u%s",
g_cfg->osmux_batch_size, VTY_NEWLINE);
vty_out(vty, " osmux port %u%s",
g_cfg->osmux_port, VTY_NEWLINE);
}
return CMD_SUCCESS;
}