[PATCH] libosmo-sccp[master]: xua: Write 'local-ip' only if non-NULL

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Nov 9 08:17:29 UTC 2017


Review at  https://gerrit.osmocom.org/4751

xua: Write 'local-ip' only if non-NULL

Avoid writing 'local-ip (null)' to the config file

Change-Id: Ie49f21afd6b29b8e4a3b16f3f18764fea856d196
---
M src/osmo_ss7_vty.c
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/51/4751/1

diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 890fec8..81b5521 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -489,7 +489,8 @@
 	vty_out(vty, " listen %s %u%s",
 		get_value_string(osmo_ss7_asp_protocol_vals, xs->cfg.proto),
 		xs->cfg.local.port, VTY_NEWLINE);
-	vty_out(vty, "  local-ip %s%s", xs->cfg.local.host, VTY_NEWLINE);
+	if (xs->cfg.local.host)
+		vty_out(vty, "  local-ip %s%s", xs->cfg.local.host, VTY_NEWLINE);
 	if (xs->cfg.accept_dyn_reg)
 		vty_out(vty, "  accept-asp-connections dynamic-permitted%s", VTY_NEWLINE);
 }

-- 
To view, visit https://gerrit.osmocom.org/4751
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie49f21afd6b29b8e4a3b16f3f18764fea856d196
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list