Harald Welte has submitted this change and it was merged.

Change subject: vty: print RTP IP of lchan if actually bound; print remote 
(mgw) IP
......................................................................


vty: print RTP IP of lchan if actually bound; print remote (mgw) IP

Change-Id: I87840aa0f5b9c04d7736bf5f649142219853711a
---
M src/libbsc/bsc_vty.c
1 file changed, 15 insertions(+), 5 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index 2246349..3da4745 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -1164,11 +1164,21 @@
                vty_out(vty, "  No Subscriber%s", VTY_NEWLINE);
        if (is_ipaccess_bts(lchan->ts->trx->bts)) {
                struct in_addr ia;
-               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%02x%s",
+                               inet_ntoa(ia), lchan->abis_ip.connect_port,
+                               lchan->abis_ip.rtp_payload, 
lchan->abis_ip.speech_mode,
+                               VTY_NEWLINE);
+               }
+
        }
 
        /* we want to report the last measurement report */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I87840aa0f5b9c04d7736bf5f649142219853711a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder

Reply via email to