[OpenSIPS-Devel] [opensips] cachedb_memcached cache_fetch returns -2 even for empty value (#522)

apsaras notifications at github.com
Tue May 26 20:54:55 CEST 2015


The problem found is that the cache_fetch function returns -2 in case MemCached does not respond and in case where MemCached returns an empty value. In such case, we are not able to distinct between ERROR and Empty value so the following script is not working

 $var(mc_first)=cache_fetch("memcached:first","$avp(num)",$avp(net));
 
if($var(mc_first)==-2)
{
    $var(mc_second)=cache_fetch("memcached:second","$avp(num)",$avp(net));
     
    if($var(mc_second)==-2)
    {
          avp_db_query("$avp(num)","$avp(net)","1");
     }
 }

OpenSIPs 2.1

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/522
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20150526/22ca7605/attachment.htm>


More information about the Devel mailing list