[OpenSIPS-Users] Value of www_authorize function
Anca Vamanu
anca at opensips.org
Thu Jan 27 12:53:32 CET 2011
Dovid,
It is just a formating transformation - the xlog buffer is constructed
by doing memcpy and then when the buffer is printed with %s, the
unsigned integer is written as signed one.
You can not change something easily to make it output -1 instead of
those many numbers. But the value stored in $avp(s:222) is the integer
-1. It should not be such a nuisance to you, if it is 0 it is success,
if it has a lot of numbers it is error.
Regards,
--
Anca Vamanu
www.voice-system.ro
On 01/26/2011 05:12 PM, Dovid Bender wrote:
> Bogdan,
> I am not sure if I fully understand what you wrote. How do I get
> OpenSips to just output -1 or what ever the value is instead of having
> to convert it to binary.
>
> Dovid
>
> ----- Original Message -----
> *From:* Anca Vamanu <mailto:anca at opensips.org>
> *To:* users at lists.opensips.org <mailto:users at lists.opensips.org>
> *Sent:* Wednesday, January 26, 2011 11:25
> *Subject:* Re: [OpenSIPS-Users] Value of www_authorize function
>
> Hi Dovid,
> On 01/25/2011 06:15 PM, Dovid Bender wrote:
>> Hi,
>>
>> When doing:
>> $avp(s:222) = www_authorize("", "phones");
>> xlog(".-.-.-. $avp(s:222) .-.-.-.-.");
>> I get back: .-.-.-. 18446744073709551615 .-.-.-.-.
> If you write it in binary it is 128 of 1 - so that number is in
> fact -1. Seems like www_authorize returns error.
>
> Regards,
>
> --
> Anca Vamanu
> www.voice-system.ro
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110127/e545e504/attachment.htm>
More information about the Users
mailing list