Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1420 → Rev 1377

/conf/radius/counter.conf
57,21 → 57,11
# previous reset period into the current period but
# involves more work for the SQL server than those
# below
query = "SELECT SUM(acctsessiontime - \
GREATEST((%b - UNIX_TIMESTAMP(acctstarttime)), 0)) \
FROM radacct WHERE username = '%{${key}}' AND \
UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '%b'"
 
# Ancienne requete
# query = "SELECT SUM(acctsessiontime - \
# GREATEST((%b - UNIX_TIMESTAMP(acctstarttime)), 0)) \
# FROM radacct WHERE username = '%{${key}}' AND \
# UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '%b'"
 
 
# Requete modifiée
query = "SELECT IFNULL((SELECT SUM(acctsessiontime - \
GREATEST((%b - UNIX_TIMESTAMP(acctstarttime)),0)) \
FROM radacct WHERE username = '%{${key}}' AND \
UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '%b'),0)"
 
 
# This query ignores calls that started in a previous
# reset period and continue into into this one. But it
# is a little easier on the SQL server
98,22 → 88,11
# previous reset period into the current period but
# involves more work for the SQL server than those
# below
 
 
# Ancienne requete
# query = "SELECT SUM(acctsessiontime - \
# GREATEST((%b - UNIX_TIMESTAMP(acctstarttime)), 0)) \
# FROM radacct WHERE username='%{${key}}' AND \
# UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '%b'"
 
 
# Requete modifiée
query = "SELECT IFNULL((SELECT SUM(acctsessiontime - \
query = "SELECT SUM(acctsessiontime - \
GREATEST((%b - UNIX_TIMESTAMP(acctstarttime)), 0)) \
FROM radacct WHERE username='%{${key}}' AND \
UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '%b'),0)"
UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '%b'"
 
 
# This query ignores calls that started in a previous
# reset period and continue into into this one. But it
# is a little easier on the SQL server