From fcec6d85d01a16a5fcbd553d5e078cb86b92d9cb Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 29 Aug 2014 15:24:00 +0200 Subject: 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. --- openbsc/src/libmgcp/mgcp_vty.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'openbsc/src/libmgcp') diff --git a/openbsc/src/libmgcp/mgcp_vty.c b/openbsc/src/libmgcp/mgcp_vty.c index e8d6bde70..bbbf51758 100644 --- a/openbsc/src/libmgcp/mgcp_vty.c +++ b/openbsc/src/libmgcp/mgcp_vty.c @@ -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; } -- cgit v1.2.3