<div dir="ltr"><div>Hi Bogdan,</div><div><br></div><div>The patch gives errors.</div><div><br></div><div>I have two perl functions:</div><div><br></div><div><div>sub return1 {</div><div><span class="" style="white-space:pre">        </span>return 1;</div><div>}</div><div><br></div><div>sub returnminus1 {</div><div><span class="" style="white-space:pre">        </span>return -1;</div><div>}</div></div><div><br></div><div>In the OpenSIPS script I have:</div><div><br></div><div><div>route {</div><div> perl_exec_simple("return1");</div><div> xlog("L_INFO", "$retcode\n");</div><div> perl_exec_simple("returnminus1");</div><div> xlog("L_INFO", "$retcode\n");</div><div><br></div><div> perl_exec("return1");</div><div> xlog("L_INFO", "$retcode\n");</div><div> perl_exec("returnminus1");</div><div> xlog("L_INFO", "$retcode\n");</div><div><br></div><div> sl_send_reply("600", "Road Closed");</div><div> drop;</div><div> exit;</div></div><div>}</div><div><br></div><div>Syslog shows:</div><div><br></div><div><div> /usr/sbin/opensips[22354]: ERROR:perl:perl_exec_simple: function return1 failed to return anything</div><div> /usr/sbin/opensips[22354]: -1</div><div> /usr/sbin/opensips[22354]: ERROR:perl:perl_exec_simple: function returnminus1 failed to return anything</div><div> /usr/sbin/opensips[22354]: -1</div><div> /usr/sbin/opensips[22354]: 1</div><div> /usr/sbin/opensips[22354]: -1</div></div><div><br></div><div>perl_exec() still works okay, but perl_exec_simple() gives errors.</div><div><br></div><div><br></div><div>- Jeff</div><div><br></div><div><br></div><div class="gmail_extra"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div title="Page 1" style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></div><div title="Page 1" style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Thu, Jul 7, 2016 at 5:44 AM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@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">
<tt>Hi Jeff,<br>
<br>
I think the difference is a mis. Could you please test the
attached patch.<br>
<br>
Regards,<br>
</tt>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre><div><div class="h5">
<div>On 07.07.2016 04:42, Jeff Pyle wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div dir="ltr">Hello,<br>
<div><br>
</div>
<div>I'm using 2.1 cloned from git earlier today. I notice when
I use perl_exec_simple(), the return code is always 1,
regardless of the return code at the end of the perl
function. With perl_exec(), however, the return code matches
the return code in the function. Is this difference
intentional?</div>
<div><br>
</div>
<div><br>
</div>
<div>- Jeff</div>
<div><br>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div></blockquote><br>
</div>
</blockquote></div><br></div></div>