[OpenSIPS-Devel] [ opensips-Bugs-2685457 ] Return values for localcache fetch op backwards

SourceForge.net noreply at sourceforge.net
Thu Mar 12 19:01:47 CET 2009


Bugs item #2685457, was opened at 2009-03-12 19:28
Message generated for change (Comment added) made by anca_vamanu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2685457&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Phil D'Amore (ptdamore)
>Assigned to: Anca Vamanu (anca_vamanu)
Summary: Return values for localcache fetch op backwards

Initial Comment:
In r5294 a change was made to allow lcache_htable_fetch to return an additional code in the event of an error.

It returns -1 for error and 0 for not found.  This is inconsistent with script functions should be returning and causes script to halt if a cache entry is not found.

Attached patch switches the values for error and notfound so the script doesn't exit incorrectly. 

----------------------------------------------------------------------

>Comment By: Anca Vamanu (anca_vamanu)
Date: 2009-03-12 20:01

Message:
Hi Phil,

Thank you for the report. 
I have changed that when I introduced MI commands forgeting that the core
function cache_fetch returns the code from "lcache_htable_fetch" function.

I have chosen to put -2 instead of 0 and not gone for your solution of
putting 0 in case of error since I think it is better not to exit the
script in any case.

regards,
Anca 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2685457&group_id=232389



More information about the Devel mailing list