pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-sigtran/+/40550?usp=email )

Change subject: ss7_vty: Improve VTY output of vty_dump_rtable()
......................................................................

ss7_vty: Improve VTY output of vty_dump_rtable()

This same outputting hint is used by Cisco ITP.

This commit doesn't change any .vty file because there's actually a bug
when adding routes into existing combined linksets, hence the scenario
in the .vty file doesn't end up containing a combined linkset with
multiple routes, but actually multiple combined linksets each with 1
route. This issue is fixed in the follow-up commit.

Change-Id: I87511084278976889ab031fcfd10c09cc60c7595
---
M src/ss7_vty.c
1 file changed, 6 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  osmith: Looks good to me, approved




diff --git a/src/ss7_vty.c b/src/ss7_vty.c
index 1f443d2..ab9784c 100644
--- a/src/ss7_vty.c
+++ b/src/ss7_vty.c
@@ -517,9 +517,13 @@

                llist_for_each_entry(rt, &clset->routes, list) {
                        bool rt_avail = ss7_route_is_available(rt);
-
+                       bool first_rt_in_clset = (rt == 
llist_first_entry(&clset->routes, struct osmo_ss7_route, list));
+                       /* Print route str only in first rt in combined linkset.
+                        * This allows users to easily determine visually 
combined
+                        * linksets: */
+                       const char *rt_str = first_rt_in_clset ? 
osmo_ss7_route_print(rt) : "";
                        vty_out(vty, "%-16s %-5s %c %c %u %-19s %-7s %-7s %-7s 
%-3s%s",
-                               osmo_ss7_route_print(rt),
+                               rt_str,
                                rt_avail ? "acces" : "INACC",
                                ' ',
                                '0' + rt->cfg.qos_class,

--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40550?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I87511084278976889ab031fcfd10c09cc60c7595
Gerrit-Change-Number: 40550
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>

Reply via email to