[PATCH] libosmocore[master]: vty/osmo_counter: use name if description is NULL

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
Tue Oct 4 15:27:08 UTC 2016


Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/1003

to look at the new patch set (#2).

vty/osmo_counter: use name if description is NULL

`show stats` shows (null) for osmocom_counters when
description is null.

OpenBSC> show  stats
Ungrouped counters:
 (null):        4

Change-Id: I553b88a6fca688924b1f2b49e8cb17e90f057bb1
---
M src/vty/utils.c
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/03/1003/2

diff --git a/src/vty/utils.c b/src/vty/utils.c
index 3a0f138..27c1a85 100644
--- a/src/vty/utils.c
+++ b/src/vty/utils.c
@@ -159,9 +159,13 @@
 {
 	struct vty_out_context *vctx = vctx_;
 	struct vty *vty = vctx->vty;
+	const char *description = counter->description;
+
+	if (!counter->description)
+		description = counter->name;
 
 	vty_out(vty, " %s%s: %8lu%s",
-		vctx->prefix, counter->description,
+		vctx->prefix, description,
 		osmo_counter_get(counter), VTY_NEWLINE);
 
 	return 0;

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I553b88a6fca688924b1f2b49e8cb17e90f057bb1
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list