<div dir="ltr">When delete xlog after the radius all working fine!<div>Thanks!</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-01-16 13:08 GMT+02:00 Răzvan Crainea <span dir="ltr"><<a href="mailto:razvan@opensips.org" target="_blank">razvan@opensips.org</a>></span>:<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>The $rc in the switch is the return value of xlog(), which
probably is success.<br>
Just remove the xlog after the radius_send_auth(), or store the
$rc in a variable and test that variable.<br>
<br>
Best regards,<br>
</tt>
<pre class="m_2381945230067480962moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a class="m_2381945230067480962moz-txt-link-abbreviated" href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre><div><div class="h5">
<div class="m_2381945230067480962moz-cite-prefix">On 01/16/2017 12:24 PM, Dragomir
Haralambiev wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div dir="ltr">
<div>Hello,</div>
<div><br>
</div>
<div>I see problem when using switch .. case.<br>
Opensips version 2.2.2.</div>
<div><br>
</div>
<div>Here is part of my script:</div>
<div><br>
</div>
<div>
<div><span class="m_2381945230067480962gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>radius_send_auth("out","in");</div>
<div><span class="m_2381945230067480962gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>xlog("L_ERR",<span class="m_2381945230067480962gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>"Radius
return $rc");</div>
<div><span class="m_2381945230067480962gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>switch
($rc) {</div>
<div><span class="m_2381945230067480962gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>case
-1:</div>
<div><span class="m_2381945230067480962gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>xlog("L_ERR",
"ERROR during authentication");</div>
<div><span class="m_2381945230067480962gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>sl_reply_error(); </div>
<div><span class="m_2381945230067480962gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>exit;</div>
<div><span class="m_2381945230067480962gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>case
-2:</div>
<div><span class="m_2381945230067480962gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>xlog("L_ERR",
"Authentication denied");</div>
<div><span class="m_2381945230067480962gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>sl_reply_error(); </div>
<div><span class="m_2381945230067480962gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>exit;</div>
<div><span class="m_2381945230067480962gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>}
# end switch</div>
<div><span class="m_2381945230067480962gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>xlog("L_ERR",<span class="m_2381945230067480962gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>"Continue
....");</div>
</div>
<div><br>
</div>
<div>This is results:</div>
<div>Jan 16 10:16:55 sbc-01 /usr/sbin/opensips[7820]: Radius
return -1</div>
<div>Jan 16 10:16:55 sbc-01 /usr/sbin/opensips[7820]: Continue
....</div>
<div><br>
</div>
<div>Best regards,</div>
<div>Dragomir</div>
</div>
<br>
<fieldset class="m_2381945230067480962mimeAttachmentHeader"></fieldset>
<br>
</div></div><pre>______________________________<wbr>_________________
Users mailing list
<a class="m_2381945230067480962moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a class="m_2381945230067480962moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
<br>______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>