Re: expr in sql doesn't work?

2003-03-14 Thread Alan DeKok
Dmitry Glushenok <[EMAIL PROTECTED]> wrote:
> I use freeradius-0.8.1 with mysql.
> In radiusd.conf expr listed in modules and in instantiate.
> In mysql at Framed-IP-Address i've put following line:
> 
> `%{expr: sql: SELECT inetipaddress FROM users.accounts WHERE username = 'glush'}`
> 
> But no SELECT from users.accounts happens at processing logon.

  You didn't tell them to happen.

  The macros are documented as %{foo:...}.  You have NOT done that
with the SQL query.

  Alan DeKok.

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


expr in sql doesn't work?

2003-03-14 Thread Dmitry Glushenok
Hello,

I use freeradius-0.8.1 with mysql.
In radiusd.conf expr listed in modules and in instantiate.
In mysql at Framed-IP-Address i've put following line:

`%{expr: sql: SELECT inetipaddress FROM users.accounts WHERE username = 'glush'}`

But no SELECT from users.accounts happens at processing logon.

In ChangeLog version 0.8.
" * Preliminary 'expression' module, to allow you to do cool things
like:Session-Timeout = `%{expr:3600 - %{sql:SELECT ...}}`"

That is don't work now? Or i have wrong syntax?

In debug log (-x -x) no messages from expr, just:
Debug: Module: Loaded expr
Debug: Module: Instantiated expr (expr)
and:
Sending Access-Accept of id 201 to 127.0.0.1:32816
Session-Octets-Limit = 877068731
Framed-IP-Address = `%{expr: sql: SELECT inetipaddress FROM users.accounts 
WHERE username = 'glush'}`
...


-- 
regards,
  Dmitry



- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html