<p>In <a href="https://github.com/OpenSIPS/opensips/pull/728#discussion_r48743447">modules/ratelimit/ratelimit.c</a>:</p>
<pre style='color:#555'>> +        return hist_counter;
> +}
> +
> +
> +
> +/**
> + * the algorithm keeps a circular window of requests in a fixed size buffer
> + *
> + * @param pipe containing the window
> + * @param update whether or not to inc call number
> + * @return number of calls in the window
> + */
> +static inline int hist_check(rl_pipe_t *pipe)
> +{
> +        /* Window ELement*/
> +        #define WEL(__el__) pipe->rwin.__el__
</pre>
<p>This is really bad programming - use the structure and its field!</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/pull/728/files#r48743447">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOciUcivhgFbmMakjW8CDCDGucV7FPNks5pWouogaJpZM4G3c6v.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#r48743447"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>