Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1419 → Rev 1420

/conf/radius/counter.conf
57,11 → 57,21
# 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
88,11 → 98,22
# previous reset period into the current period but
# involves more work for the SQL server than those
# below
query = "SELECT SUM(acctsessiontime - \
 
 
# 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'"
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