Re: rlm_perl hash issue

This is a discussion on Re: rlm_perl hash issue within the FreeRADIUS Users forums, part of the Networking and Network Related category; On Wed, Mar 23, 2005 at 04:22:34PM +0200, Boian Jordanov wrote: > Fixed in CVS. Please use recent ...


Go Back   Usenet Forums > Networking and Network Related > FreeRADIUS Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-23-2005
Alexander M. Pravking
 
Posts: n/a
Default Re: rlm_perl hash issue

On Wed, Mar 23, 2005 at 04:22:34PM +0200, Boian Jordanov wrote:
> Fixed in CVS. Please use recent cvs snapshot.
>
> Before rlm_perl expects that scalar value of RAD_xxx hash is character
> value, now it can be string or integer. There is only one limitation an
> ip address should be returned as character value i.e.
> $RAD_REPLY{'Framed-Ip-Address'} = "127.0.0.1";


- if ((sv != NULL) && (SvPOK(sv))) {
- val = SvPV(sv, val_len);
+ if (SvTRUE(sv)) {
+ val = SvPV_nolen(sv);

What if sv is 0 (or "0")? SvTRUE would fail, I think...
SvLEN(sv) != 0 maybe? Or just (SvPOK(sv) || SvNIOK(sv))?

What are you trying to check? Maybe (sv != &PL_sv_undef) is sufficient?


--
Fduch M. Pravking

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:43 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0