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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |