On Sun, 8 Sep 2002, mehdi roomi wrote:
> Hi,
> I use the following sql counter and run radiusd in full debug mode:
> sqlcounter m5 {
> counter-name = m5
> check-name = Max-M5-Session
> sqlmod-inst = sql
> key = User-Name
> query = "SELECT SUM(IF(HOUR(AcctStartTime)>='02:00:00' AND
>HOUR(AcctStopTime)<='06:00:00',5
> * AcctSessionTime,0) +IF(HOUR(AcctStartTime)>='07:00:00' AND
>HOUR(AcctStopTime)<='13:00:00',2
> * AcctSessionTime,0) +IF(HOUR(AcctStartTime)>='14:00:00' AND
>HOUR(AcctStopTime)<='23:00:00',3*AcctSessionTime,0))
> FROM radacct WHERE UserName='%{%k}'"
>
> and get the following error :
>
> rlm_sql: Reserving sql socket id: 2
> query: SELECT SUM(IF(HOUR(AcctStartTime)>='02:00:00' AND
>HOUR(AcctStopTime)<='06:00:00',5
> * AcctSessionTime,0) +IF(HOUR(AcctStartTime)>='07:00:00' AND
>HOUR(AcctStopTime)<='13:00:00',2
> * AcctSessionTime,0) +IF(HOUR(AcctStartTime)>='14:00:00' AND HOUR(Acct
> MYSQL check_error: 1064 received
> rlm_sql: database query error
> rlm_sql: Released sql socket id: 2
> radius_xlat: ''
> rlm_sqlcounter: (Check item - counter) is greater than zero
> rlm_sqlcounter: Authorized user saber, check_item=20000000, counter=0
> rlm_sqlcounter: Sent Reply-Item for user saber, Type=Session-Timeout, value=20000000
> modcall[authorize]: module "m5" returns ok
> modcall: group authorize returns ok
Do a cvs update. It should work now.
--
Kostas Kalevras Network Operations Center
[EMAIL PROTECTED] National Technical University of Athens, Greece
Work Phone: +30 10 7721861
'Go back to the shadow' Gandalf
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html