<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Nathan,<br>
<br>
thanks for the patch. It will get in, but not sure yet if for 3.2.0,
we are in testing phase. The patch is not that big, I will evaluate
and see if there is any major impact. Ultimately it will be in next
version.<br>
<br>
Daniel<br>
<br>
On 8/25/11 9:31 PM, Nathan Angelacos wrote:
<blockquote cite="mid:4E56A2F6.9070403@genericconf.com" type="cite">Enclosed
is a small patch that allows lua_run() to return an integer
value. If the return value is not an integer, 1 is returned (like
is true with current git master.) As a side effect, lua scripts
can now exit() the sip-router script by returning 0.
<br>
<br>
<br>
Example:
<br>
<br>
Lua script:
<br>
test_equality = function ( a , b )
<br>
if a == b then
<br>
return 1
<br>
else
<br>
return -1
<br>
end
<br>
<br>
sip-router script:
<br>
<br>
if (lua_run("test_equality", "$fU", "$tU")) {
<br>
xdbg("SCRIPT: The values are equal\n");
<br>
}
<br>
<br>
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
sr-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Kamailio Advanced Training, Oct 10-13, Berlin: <a class="moz-txt-link-freetext" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
</body>
</html>