On 04/05/16 08:18, Alex Balashov wrote:

On 05/04/2016 02:09 AM, Daniel-Constantin Mierla wrote:

the new code example doesn't do exactly like the old one

D'oh! You're right. I was careless in my analysis of that statement, and didn't see that the negation was on the outside.

It sounds like the GRUU-related commit that introduced this was

https://github.com/kamailio/kamailio/commit/fd9fe6e683ca3c446daa043035072a379f9b11bb

I don't know who is to blame? ;-)
:-) -- knowing that I tend to use clear statements, looking at the patch the expression was more or less inherited from previous version, respectively the patch removes:

 -    while ( (ptr) &&
 -    !(VALID_CONTACT(ptr,act_time) && (ret=-2) && allowed_method(_m,ptr)))
 -        ptr = ptr->next;
 -    if (ptr==0) {

Cheers,
Daniel
-- 
Daniel-Constantin Mierla
http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, Berlin, May 18-20, 2016 - http://www.kamailioworld.com