Re: rlm_perl hash issue

2005-03-23 Thread Boian Jordanov
On Wed, Mar 23, 2005 at 05:13:14AM +0200, Chris Knipe wrote: Lo all, This has been to the perl mailing lists as well, there is nothing wrong with the code as far as every one knows... rlm_perl just doesn't like this for some reason Snipets of the script in question:

Re: rlm_perl hash issue

2005-03-23 Thread Chris Knipe
- Original Message - From: Boian Jordanov [EMAIL PROTECTED] To: freeradius-users@lists.freeradius.org Sent: Wednesday, March 23, 2005 9:56 AM Subject: Re: rlm_perl hash issue On Wed, Mar 23, 2005 at 05:13:14AM +0200, Chris Knipe wrote: Lo all, This has been to the perl mailing lists

Re: rlm_perl hash issue

2005-03-23 Thread Peter Nixon
On Wednesday 23 March 2005 09:18, Chris Knipe wrote: - Original Message - From: Chris Knipe [EMAIL PROTECTED] To: freeradius-users@lists.freeradius.org Sent: Wednesday, March 23, 2005 5:31 AM Subject: Re: rlm_perl hash issue Chris Knipe [EMAIL PROTECTED] wrote: So basically

Re: rlm_perl hash issue

2005-03-23 Thread Kenneth Grady
try putting them in perenthesis re: $RAD_REPLY{'Recv-Limit'} = ($BytesAvail - $BytesUsed); $RAD_REPLY{'Xmit-Limit'} = ($BytesAvail - $BytesUsed); The array may be adding the data in as a string. On Tue, 2005-03-22 at 20:13, Chris Knipe wrote: Lo all, This has been to the perl mailing lists as

Re: rlm_perl hash issue

2005-03-23 Thread Boian Jordanov
On Wed, Mar 23, 2005 at 01:48:43PM +0200, Peter Nixon wrote: On Wednesday 23 March 2005 09:18, Chris Knipe wrote: - Original Message - From: Chris Knipe [EMAIL PROTECTED] To: freeradius-users@lists.freeradius.org Sent: Wednesday, March 23, 2005 5:31 AM Subject: Re: rlm_perl hash

Re: rlm_perl hash issue

2005-03-23 Thread Chris Knipe
Eeeek. There is definitely a bug somewhere :-( 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.

Re: rlm_perl hash issue

2005-03-23 Thread Alexander M. Pravking
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

Re: rlm_perl hash issue

2005-03-23 Thread Boian Jordanov
On Wed, Mar 23, 2005 at 07:42:20PM +0300, Alexander M. Pravking wrote: - 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

rlm_perl hash issue

2005-03-22 Thread Chris Knipe
Lo all, This has been to the perl mailing lists as well, there is nothing wrong with the code as far as every one knows... rlm_perl just doesn't like this for some reason Snipets of the script in question: $RAD_REPLY{'Acct-Interim-Interval'} = 300;

Re: rlm_perl hash issue

2005-03-22 Thread Alan DeKok
Chris Knipe [EMAIL PROTECTED] wrote: So basically: $RAD_REPLY{'Recv-Limit'} = $BytesAvail - $BytesUsed; $RAD_REPLY{'Xmit-Limit'} = $BytesAvail - $BytesUsed; doesn't work $RAD_REPLY{'Recv-Limit'} = 23423424; $RAD_REPLY{'Xmit-Limit'} = 23234242; works Hmm...

Re: rlm_perl hash issue

2005-03-22 Thread Chris Knipe
Chris Knipe [EMAIL PROTECTED] wrote: So basically: $RAD_REPLY{'Recv-Limit'} = $BytesAvail - $BytesUsed; $RAD_REPLY{'Xmit-Limit'} = $BytesAvail - $BytesUsed; doesn't work $RAD_REPLY{'Recv-Limit'} = 23423424; $RAD_REPLY{'Xmit-Limit'} = 23234242; works Hmm... that

Re: rlm_perl hash issue

2005-03-22 Thread Chris Knipe
- Original Message - From: Chris Knipe [EMAIL PROTECTED] To: freeradius-users@lists.freeradius.org Sent: Wednesday, March 23, 2005 5:31 AM Subject: Re: rlm_perl hash issue Chris Knipe [EMAIL PROTECTED] wrote: So basically: $RAD_REPLY{'Recv-Limit'} = $BytesAvail - $BytesUsed