aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-04-21 13:08:35 -0400
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-04-21 13:08:35 -0400
commitc5950d7c6025923891254cd66b095b943e6d02d8 (patch)
tree385ec8f8af2c6dd18438f3421ed26d8581d14a7b
parente2aba7d0d0d921cd674a0bee8ac0d85c0ff5c12c (diff)
vty: Avoid printing "ip (null)" in the saved config file
-rw-r--r--src/vty_interface.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vty_interface.c b/src/vty_interface.c
index 38f7053..d5884f9 100644
--- a/src/vty_interface.c
+++ b/src/vty_interface.c
@@ -263,7 +263,8 @@ static void write_msc(struct vty *vty, struct msc_connection *msc)
vty_out(vty, " msc %d%s", msc->nr, VTY_NEWLINE);
vty_out(vty, " description %s%s", name, VTY_NEWLINE);
vty_out(vty, " mode %s%s", msc_mode(msc), VTY_NEWLINE);
- vty_out(vty, " ip %s%s", msc->ip, VTY_NEWLINE);
+ if (msc->ip)
+ vty_out(vty, " ip %s%s", msc->ip, VTY_NEWLINE);
vty_out(vty, " port %d%s", msc->port, VTY_NEWLINE);
vty_out(vty, " token %s%s", msc->token, VTY_NEWLINE);
vty_out(vty, " dscp %d%s", msc->dscp, VTY_NEWLINE);