Greetings,

I am a Kamailio user trying to get more deeply familiar with the platform. I have been digging through the code and spotted something that just seems wrong. I am not really a programmer (I dabble some, but...) so did not want to go down the path of reporting a bug, at least not just yet. I wanted another opinion first. In fact I am not aware of any obvious misbehavior in this area, but the code just looks wrong to my eye.

I refer to 4.40 kamailio/modules/registrar/lookup.c lines 265-267

        if( (ptr) && !(VALID_CONTACT(ptr,act_time)
                    && (ret=-2) && allowed_method(_m,ptr)))
            goto done;

It appears in 266 the author meant to do a test for equality, as in '&& ( ret==-2 )' and simply dropped an equals sign producing an assignment by mistake.

Or am I misunderstanding something here? Why would an assignment be in an if conditional if not by mistake?

I looked back through several other versions and they all had the exact same usage. It seems as if this is so egregious that it must be intentional. So I tend presume I am just ignorant of some really masterful trick of programming.

Please enlighten me if I am in the weeds here. If this is indeed an error, what do I need to do to properly report it?

Regards,
Nathan