From e21192dbb0dc45a22c2c8adb3fa2794a0b51ddb1 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Wed, 23 Oct 2019 13:47:06 +0200 Subject: vty: Fix write-config of local-ip and remote-ip commands Fixes: CID#205338 Fixes: CID#205337 Change-Id: I7b01e53aa4bfd714467cbd729cfcf4dc12a64bd4 --- src/osmo_ss7_vty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 8169aaf..23607ca 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -500,7 +500,7 @@ static void write_one_xua(struct vty *vty, struct osmo_xua_server *xs) xs->cfg.local.port, VTY_NEWLINE); for (i = 0; i < xs->cfg.local.host_cnt; i++) { - if (xs->cfg.local.host) + if (xs->cfg.local.host[i]) vty_out(vty, " local-ip %s%s", xs->cfg.local.host[i], VTY_NEWLINE); } if (xs->cfg.accept_dyn_reg) @@ -698,11 +698,11 @@ static void write_one_asp(struct vty *vty, struct osmo_ss7_asp *asp) if (asp->cfg.description) vty_out(vty, " description %s%s", asp->cfg.description, VTY_NEWLINE); for (i = 0; i < asp->cfg.local.host_cnt; i++) { - if (asp->cfg.local.host) + if (asp->cfg.local.host[i]) vty_out(vty, " local-ip %s%s", asp->cfg.local.host[i], VTY_NEWLINE); } for (i = 0; i < asp->cfg.remote.host_cnt; i++) { - if (asp->cfg.remote.host) + if (asp->cfg.remote.host[i]) vty_out(vty, " remote-ip %s%s", asp->cfg.remote.host[i], VTY_NEWLINE); } if (asp->cfg.qos_class) -- cgit v1.2.3