<p>In <a href="https://github.com/OpenSIPS/opensips/pull/728#discussion_r48743816">modules/ratelimit/ratelimit_helper.c</a>:</p>
<pre style='color:#555'>&gt; @@ -995,6 +1061,9 @@ void rl_timer_repl(utime_t ticks, void *param)
&gt;                          if (bin_push_int((*pipe)-&gt;limit) &lt; 0)
&gt;                                  goto error;
&gt;  
&gt; +                        if (bin_push_int(hist_count(*pipe)) &lt; 0)
</pre>
<p>Just compute the last counter and push in the counter variable.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/pull/728/files#r48743816">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOciTFnIhHDPmJa9JAxZZQqI7GJEAKXks5pWoxmgaJpZM4G3c6v.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/OpenSIPS/opensips/pull/728/files#r48743816"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>