[PATCH] osmo-bts[master]: vty: don't print "Bound IP / Port" if it isn't bound [yet]

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
Mon Feb 5 20:30:11 UTC 2018


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

vty: don't print "Bound IP / Port" if it isn't bound [yet]

Change-Id: I28705b56582d334d568d98a371daa6bb9ef1f625
---
M src/common/vty.c
1 file changed, 7 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/82/6282/1

diff --git a/src/common/vty.c b/src/common/vty.c
index 43311cd..066f03d 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -1055,11 +1055,13 @@
 		get_value_string(gsm48_cmode_names, lchan->tch_mode),
 		VTY_NEWLINE);
 
-	ia.s_addr = htonl(lchan->abis_ip.bound_ip);
-	vty_out(vty, "  Bound IP: %s Port %u RTP_TYPE2=%u CONN_ID=%u%s",
-		inet_ntoa(ia), lchan->abis_ip.bound_port,
-		lchan->abis_ip.rtp_payload2, lchan->abis_ip.conn_id,
-		VTY_NEWLINE);
+	if (lchan->abis_ip.bound_ip) {
+		ia.s_addr = htonl(lchan->abis_ip.bound_ip);
+		vty_out(vty, "  Bound IP: %s Port %u RTP_TYPE2=%u CONN_ID=%u%s",
+			inet_ntoa(ia), lchan->abis_ip.bound_port,
+			lchan->abis_ip.rtp_payload2, lchan->abis_ip.conn_id,
+			VTY_NEWLINE);
+	}
 	if (lchan->abis_ip.connect_ip) {
 		ia.s_addr = htonl(lchan->abis_ip.connect_ip);
 		vty_out(vty, "  Conn. IP: %s Port %u RTP_TYPE=%u SPEECH_MODE=0x%02u%s",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I28705b56582d334d568d98a371daa6bb9ef1f625
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list