[SR-Users] Kamailio 3.1.4 Bitwise Operators?

Brandon Armstead brandon at cryy.com
Wed Aug 3 01:24:04 CEST 2011


Daniel,

   This commit is working perfectly!  Thank you.

Sincerely,
Brandon Armstead

On Tue, Aug 2, 2011 at 3:05 PM, Daniel-Constantin Mierla
<miconda at gmail.com>wrote:

>  Hello,
>
> some of the bitwise operators were forgotten to be added when we migrated
> to the new core. They were added some time ago, but in master branch since I
> didn't want to commit in stable branch at that moment, because it was just
> few days before 3.1.4, not allowing testing.
>
> I just backported the patch to branch 3.1, so if you fetch the sources from
> GIT now, you should have them and the AND with binary NOT should work
> properly. Let me know if not.
>
> Instead of 'x !~ y' you have to use for now: !(x =~ y).
>
> Cheers,
> Daniel
>
> On 8/2/11 10:44 PM, Brandon Armstead wrote:
>
> Hello,
>
>     It seems as if the bitwise operations in Kamailio 3.1.4 are broken?
>  Please correct me if I am doing something wrong - however simple
> evaluations such as:
>
>  $avp(s:my-test-bit) = 10;
>
>  $avp(s:my-test-bit) = (int)$avp(s:my-test-bit) & ~ 2;
>
>  Seems to result in $avp(s:my-test-bit) being equal to "2" rather than "8"
>
>  Any thoughts / Suggestions / Fixes?
>
>  I also wonder if this has any relation to !~ not working?
>
>  Thanks for all of your help in advance!
>
>  P.S. I sent this both to user list and to devel, please forgive me if
> they do not belong in one of the lists.
>
>  Sincerely,
> Brandon Armstead
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierla -- http://www.asipto.com
> Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kathttp://linkedin.com/in/miconda -- http://twitter.com/miconda
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110802/21cb90de/attachment.htm>


More information about the sr-users mailing list