<div dir="ltr">Hey Vlad,<div>That's great to hear. I'm using an older version right now.. I think it's 1.9 based. I can't upgrade quite yet. Is there a way to back port the changes to 1.9?</div><div><br></div>
<div>Thanks,</div><div>Brett</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 23, 2014 at 9:32 AM, Vlad Paiu <span dir="ltr"><<a href="mailto:vladpaiu@opensips.org" target="_blank">vladpaiu@opensips.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Hello Brett,<br>
<br>
What OpenSIPS version are you using ?<br>
<br>
In the latest GIT for all maintained branches, the code was fixed
to propagate the exact return from the module implementing the
module connectivity, except for the 0 return code, which is
converted to 1 ( success ) - done in order not to break the script
execution.<br>
<br>
Best Regards,<br>
<pre cols="72">Vlad Paiu
OpenSIPS Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a> </pre><div><div class="h5">
On 23.07.2014 17:18, Brett Nemeroff wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Hey All,</span>
<div style="font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div style="font-family:arial,sans-serif;font-size:13px">Using
memcached..</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div style="font-family:arial,sans-serif;font-size:13px">So I've
noticed that while performing a cache_fetch I can't tell the
difference between a cache failure and a NOT_FOUND. It seems
the problem is actually in <span style="background-color:rgb(255,255,204)">cachedb</span>.c
because we do this at the end of cachedb_fetch:</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div style="font-family:arial,sans-serif;font-size:13px">
return cde->cdb_func.get(con,attr,val)<0?-1:1;</div>
<div style="font-family:arial,sans-serif;font-size:13px">
</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div style="font-family:arial,sans-serif;font-size:13px">So I
read this to basically say to return -1 on any failure
regardless of the failure code. This is probably because of
the generalized nature of the cache interface and since each
cache backend has it's own return codes. I get that, but that
being said, I can't tell what the failure is and respond
properly.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div style="font-family:arial,sans-serif;font-size:13px">So I
changed that one return line to look more like this:</div>
<div style="font-family:arial,sans-serif;font-size:13px">
<br>
</div>
<div style="font-family:arial,sans-serif;font-size:13px">
<div> res = cde->cdb_func.get(con,attr,val);</div>
<div> if (res < 0) {</div>
<div> return res;</div>
<div> } else {</div>
<div> return 1;</div>
<div> }</div>
</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div style="font-family:arial,sans-serif;font-size:13px">Is this
acceptable? Will I run into problems I'm not thinking about?
The only real problem I can see is that a specific error
number on one cache backend might mean something different on
another. Obviously the only way to really fix this would be to
have each cache backend to match up it's own backend's reply
codes to a set of generic opensips cache engine reply codes
separately enumerated.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div style="font-family:arial,sans-serif;font-size:13px">Thoughts? </div>
<div style="font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div style="font-family:arial,sans-serif;font-size:13px">
Thanks,</div>
<div style="font-family:arial,sans-serif;font-size:13px">Brett</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>