[OpenSIPS-Users] Problem with switch .. case

Dragomir Haralambiev goup2010 at gmail.com
Mon Jan 16 08:41:23 EST 2017


When delete xlog after the radius all working fine!
Thanks!

2017-01-16 13:08 GMT+02:00 Răzvan Crainea <razvan at opensips.org>:

> The $rc in the switch is the return value of xlog(), which probably is
> success.
> Just remove the xlog after the radius_send_auth(), or store the $rc in a
> variable and test that variable.
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Solutionswww.opensips-solutions.com
>
> On 01/16/2017 12:24 PM, Dragomir Haralambiev wrote:
>
> Hello,
>
> I see problem when using switch .. case.
> Opensips version 2.2.2.
>
> Here is part of my script:
>
> radius_send_auth("out","in");
> xlog("L_ERR", "Radius return $rc");
> switch ($rc) {
> case -1:
> xlog("L_ERR", "ERROR during authentication");
> sl_reply_error();
> exit;
> case -2:
> xlog("L_ERR", "Authentication denied");
> sl_reply_error();
> exit;
> } # end switch
> xlog("L_ERR", "Continue ....");
>
> This is results:
> Jan 16 10:16:55 sbc-01 /usr/sbin/opensips[7820]: Radius return -1
> Jan 16 10:16:55 sbc-01 /usr/sbin/opensips[7820]: Continue ....
>
> Best regards,
> Dragomir
>
>
> _______________________________________________
> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170116/a9ab6798/attachment.html>


More information about the Users mailing list