[Devel] negative return codes don't work?

Kanakatti Mahesh Subramanya mahesh at aptela.com
Wed Sep 7 16:35:55 CEST 2005


Pretty much what I suspected.
And yeah, thats what I ended up doing - it works like a charm

thanx...

Daniel-Constantin Mierla wrote:

> It works, but the value is printed as unsigned. Anyhow, now I changed 
> the printing function for return code to print the string as signed int.
>
> If you want to try, using your version of code, then do:
>
> xlog("L_DBG", "Before : $rc");
> route(15);
> if($rc==-1) {
>    xlog("L_DBG", "After : return code is -1 ($rc)");
> }
> .
> .
>
> route[15] {
> blah;
> blah;
> return(-1);
> }
>
> Daniel
>
>
> On 09/06/05 20:27, Kanakatti Mahesh Subramanya wrote:
>
>> In the following chunklet
>>
>> xlog("L_DBG", "Before : $rc");
>> route(15);
>> xlog("L_DBG", "After : $rc");
>> .
>> .
>>
>> route[15] {
>> blah;
>> blah;
>> return(-1);
>> }
>>
>>
>> If you look at the debug output, you'll see
>>
>> Before : 4294967293
>> After : 4294967294
>>
>>
>> Needless to say, the associated "switch" statements don't work.. 
>> retcode does seem to be set to this...
>>
>> cheers
>>
>>
>> _______________________________________________
>> Devel mailing list
>> Devel at openser.org
>> http://openser.org/cgi-bin/mailman/listinfo/devel
>>  
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mahesh.vcf
Type: text/x-vcard
Size: 332 bytes
Desc: not available
Url : http://openser.org/pipermail/devel/attachments/20050907/b86d5a25/mahesh.vcf


More information about the Devel mailing list