<p>Harald Welte has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/13919">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Print error message if application fails to call rate_ctr_init()<br><br>Change-Id: Ie8093b66b7e27cf863d2558fe21b2c6e0f3fcdfd<br>Closes: OS#3580<br>---<br>M src/rate_ctr.c<br>1 file changed, 4 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/19/13919/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/rate_ctr.c b/src/rate_ctr.c</span><br><span>index 90e6502..99ec523 100644</span><br><span>--- a/src/rate_ctr.c</span><br><span>+++ b/src/rate_ctr.c</span><br><span>@@ -217,6 +217,10 @@</span><br><span>  unsigned int size;</span><br><span>   struct rate_ctr_group *group;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+     if (!osmo_timer_pending(&rate_ctr_timer))</span><br><span style="color: hsl(120, 100%, 40%);">+         LOGP(DLGLOBAL, LOGL_ERROR, "your program appears to use libosmocore rate_ctr "</span><br><span style="color: hsl(120, 100%, 40%);">+                      "without calling rate_ctr_init() at start-up. Rate counters won't work!\n");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>         if (rate_ctr_get_group_by_name_idx(desc->group_name_prefix, idx)) {</span><br><span>               unsigned int new_idx = rate_ctr_get_unused_name_idx(desc->group_name_prefix);</span><br><span>             LOGP(DLGLOBAL, LOGL_ERROR, "counter group '%s' already exists for index %u,"</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13919">change 13919</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/13919"/><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: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ie8093b66b7e27cf863d2558fe21b2c6e0f3fcdfd </div>
<div style="display:none"> Gerrit-Change-Number: 13919 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </div>