<p>Stefan Sperling <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/11467">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">stop printing group description in vty_out_rate_ctr_group_fmt()<br><br>When vty_out_rate_ctr_group_fmt() prints the description of a<br>counter group, it assumes this description should appear at<br>the beginning of a line. However, the caller might be printing<br>counters in an indented context. So just let the caller worry<br>about printing the group title if necessary (there is currently<br>only one known caller, which is updated in this commit).<br><br>Note that printing of the group title was an undocumented feature.<br><br>Change-Id: I2c55cb54e8b7a7c8c6cf72f22287083767ed0201<br>Related: OS#2660<br>---<br>M src/vty/stats_vty.c<br>M src/vty/utils.c<br>2 files changed, 1 insertion(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c</span><br><span>index 5ded7a4..62153f3 100644</span><br><span>--- a/src/vty/stats_vty.c</span><br><span>+++ b/src/vty/stats_vty.c</span><br><span>@@ -533,6 +533,7 @@</span><br><span> static int rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *sctx_)</span><br><span> {</span><br><span>  struct vty *vty = sctx_;</span><br><span style="color: hsl(120, 100%, 40%);">+      vty_out(vty, "%s:%s", ctrg->desc->group_description, VTY_NEWLINE);</span><br><span>   vty_out_rate_ctr_group_fmt(vty, "%25n: %10c (%S/s %M/m %H/h %D/d) %d", ctrg);</span><br><span>      return 0;</span><br><span> }</span><br><span>diff --git a/src/vty/utils.c b/src/vty/utils.c</span><br><span>index 0d663c6..0358d9b 100644</span><br><span>--- a/src/vty/utils.c</span><br><span>+++ b/src/vty/utils.c</span><br><span>@@ -214,9 +214,6 @@</span><br><span>                                struct rate_ctr_group *ctrg)</span><br><span> {</span><br><span>    struct vty_out_context vctx = {vty, fmt};</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-       vty_out(vty, "%s:%s", ctrg->desc->group_description, VTY_NEWLINE);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>   rate_ctr_for_each_counter(ctrg, rate_ctr_handler_fmt, &vctx);</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11467">change 11467</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/11467"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I2c55cb54e8b7a7c8c6cf72f22287083767ed0201 </div>
<div style="display:none"> Gerrit-Change-Number: 11467 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Stefan Sperling <ssperling@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Stefan Sperling <ssperling@sysmocom.de> </div>