>>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}'"


>Do a cvs update. It should work now.

I did an update to freeradius-snapshot-20020909.tar.gz.  but I get 
'Segmention fault' instead of the previous error.

radiusd -X started with no problem but then the users of  this group try to 
login, radiusd KILLs and I get the following:

....
rlm_sql: Released sql socket id: 4
  modcall[authorize]: module "sql" returns ok
rlm_sqlcounter: Entering module authorize code

sqlcounter_expand:  'SELECT SUM(IF(HOUR(AcctStopTime)>='02:00:00' AND 
HOUR(AcctStopTime)<='06:00:00',5*AcctSessionTime,0) 
+IF(HOUR(AcctStartTime)>='07:00:00',2*AcctSessionTime,0)+IF(HOUR(AcctStartTime)>='14:00:00',AcctSessionTime,0)+IF(HOUR(AcctStartTime)>='23:00:00',
+ 
AcctSessionTime,0) ) FROM radacct WHERE UserName='%{User-Name}''

radius_xlat:  'SELECT SUM(IF(HOUR(AcctStopTime)>='02:00:00' AND 
HOUR(AcctStopTime)<='06:00:00',5*AcctSessionTime,0) 
+IF(HOUR(AcctStartTime)>='07:00:00',2*AcctSessionTime,0)+IF(HOUR(AcctStartTime)>='14:00:00',AcctSessionTime,0)+IF(HOUR(AcctStartTime)>='23:00:00',
+ 
AcctSessionTime,0) ) FROM radacct WHERE UserName='saber''

sqlcounter_expand:  '%{sql:SELECT SUM(IF(HOUR(AcctStopTime)>='02:00:00' AND 
HOUR(AcctStopTime)<='06:00:00',5*AcctSessionTime,0) 
+IF(HOUR(AcctStartTime)>='07:00:00',2*AcctSessionTime,0)+IF(HOUR(AcctStartTime)>='14:00:00',AcctSessionTime,0)+IF(HOUR(AcctStartTime)>='23:00:00',
+ 
AcctSessionTime,0) ) FROM radacct WHERE UserName='saber'}'
Segmentation fault

when I try with a smaller query no error appears.

p.s. lastest freeradius + redhat linux7.3


Regards,
M. Roomi







_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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

Reply via email to