Change in libosmocore[master]: gprs_ns2_vty: hide dynamic NSE information when ask for persistant only

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/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Wed Mar 24 15:42:47 UTC 2021


lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/23451 )

Change subject: gprs_ns2_vty: hide dynamic NSE information when ask for persistant only
......................................................................

gprs_ns2_vty: hide dynamic NSE information when ask for persistant only

dump_nse() should only print persistant NSE when persistant_only
argument is set. A NSE can be persistant or dynamic configured.
Depending on the NSE all NS-VC must be the same as the NSE.

Change-Id: Ibd2c6962eda39a850ab61cf347063934378d2fdc
---
M src/gb/gprs_ns2_vty.c
1 file changed, 5 insertions(+), 8 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 7cb9ed9..6d34e5a 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -1870,18 +1870,15 @@
 {
 	struct gprs_ns2_vc *nsvc;
 
+	if (persistent_only && !nse->persistent)
+		return;
+
 	vty_out(vty, "NSEI %05u: %s, %s%s", nse->nsei, gprs_ns2_lltype_str(nse->ll),
 		nse->alive ? "ALIVE" : "DEAD", VTY_NEWLINE);
 
 	ns2_sns_dump_vty(vty, " ", nse, stats);
-	llist_for_each_entry(nsvc, &nse->nsvc, list) {
-		if (persistent_only) {
-			if (nsvc->persistent)
-				ns2_vty_dump_nsvc(vty, nsvc, stats);
-		} else {
-			ns2_vty_dump_nsvc(vty, nsvc, stats);
-		}
-	}
+	llist_for_each_entry(nsvc, &nse->nsvc, list)
+		ns2_vty_dump_nsvc(vty, nsvc, stats);
 }
 
 static void dump_bind(struct vty *vty, const struct gprs_ns2_vc_bind *bind, bool stats)

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/23451
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ibd2c6962eda39a850ab61cf347063934378d2fdc
Gerrit-Change-Number: 23451
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210324/acd7f427/attachment.htm>


More information about the gerrit-log mailing list