gprs_ns2: always use the same method to print NSVCs
The binds also print a list of associated NSVC when
dumping the bind.
However the binds using their own representation of
printing the NSVC which is different to `show ns entities`.
Use the same function to print NS-VC.
Before:
NSVCI 00000: udp)[127.0.0.1]:23000<>[127.0.0.1]:22000
After:
NSVCI none: UNCONFIGURED DYNAMIC data_weight=1 sig_weight=1 udp)[127.0.0.1]:23000<>[127.0.0.1]:22000
Change-Id: If31ec6c1c07dc134ab1ddeb915bc89747c7be048
diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 681d1cb..7cb9ed9 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -1845,7 +1845,7 @@
}
/* non-config commands */
-static void dump_nsvc(struct vty *vty, struct gprs_ns2_vc *nsvc, bool stats)
+void ns2_vty_dump_nsvc(struct vty *vty, struct gprs_ns2_vc *nsvc, bool stats)
{
char nsvci_str[32];
@@ -1877,9 +1877,9 @@
llist_for_each_entry(nsvc, &nse->nsvc, list) {
if (persistent_only) {
if (nsvc->persistent)
- dump_nsvc(vty, nsvc, stats);
+ ns2_vty_dump_nsvc(vty, nsvc, stats);
} else {
- dump_nsvc(vty, nsvc, stats);
+ ns2_vty_dump_nsvc(vty, nsvc, stats);
}
}
}
@@ -1989,7 +1989,7 @@
return CMD_WARNING;
}
- dump_nsvc(vty, nsvc, show_stats);
+ ns2_vty_dump_nsvc(vty, nsvc, show_stats);
}
return CMD_SUCCESS;