summaryrefslogtreecommitdiffstats
path: root/raddb/mods-config/sql/counter
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:41:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:41:53 +0000
commit1526b335a5a81d945e64291e2fbcf92f72d15a4e (patch)
tree64d3bc5d36df06664cc49d7c4d8710100e23b888 /raddb/mods-config/sql/counter
parentReleasing progress-linux version 3.2.3+dfsg-2~progress7.99u1. (diff)
downloadfreeradius-1526b335a5a81d945e64291e2fbcf92f72d15a4e.tar.xz
freeradius-1526b335a5a81d945e64291e2fbcf92f72d15a4e.zip
Merging upstream version 3.2.5+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'raddb/mods-config/sql/counter')
-rw-r--r--raddb/mods-config/sql/counter/sqlite/dailycounter.conf2
-rw-r--r--raddb/mods-config/sql/counter/sqlite/expire_on_login.conf2
-rw-r--r--raddb/mods-config/sql/counter/sqlite/monthlycounter.conf2
-rw-r--r--raddb/mods-config/sql/counter/sqlite/weeklycounter.conf2
4 files changed, 4 insertions, 4 deletions
diff --git a/raddb/mods-config/sql/counter/sqlite/dailycounter.conf b/raddb/mods-config/sql/counter/sqlite/dailycounter.conf
index 9a2ec38..b95afdf 100644
--- a/raddb/mods-config/sql/counter/sqlite/dailycounter.conf
+++ b/raddb/mods-config/sql/counter/sqlite/dailycounter.conf
@@ -5,7 +5,7 @@
# below
#
query = "\
- SELECT SUM(acctsessiontime - GREATEST((%%b - strftime('%%s', acctstarttime)), 0)) \
+ SELECT SUM(acctsessiontime - MAX((%%b - strftime('%%s', acctstarttime)), 0)) \
FROM radacct \
WHERE username = '%{${key}}' \
AND (strftime('%%s', acctstarttime) + acctsessiontime) > %%b"
diff --git a/raddb/mods-config/sql/counter/sqlite/expire_on_login.conf b/raddb/mods-config/sql/counter/sqlite/expire_on_login.conf
index f4e95a5..6c1c086 100644
--- a/raddb/mods-config/sql/counter/sqlite/expire_on_login.conf
+++ b/raddb/mods-config/sql/counter/sqlite/expire_on_login.conf
@@ -1,5 +1,5 @@
query = "\
- SELECT GREATEST(strftime('%%s', NOW()) - strftime('%%s', acctstarttime), 0) AS expires \
+ SELECT MAX(strftime('%%s', NOW()) - strftime('%%s', acctstarttime), 0) AS expires \
FROM radacct \
WHERE username = '%{${key}}' \
ORDER BY acctstarttime \
diff --git a/raddb/mods-config/sql/counter/sqlite/monthlycounter.conf b/raddb/mods-config/sql/counter/sqlite/monthlycounter.conf
index 5262097..3f5d427 100644
--- a/raddb/mods-config/sql/counter/sqlite/monthlycounter.conf
+++ b/raddb/mods-config/sql/counter/sqlite/monthlycounter.conf
@@ -5,7 +5,7 @@
# below
#
query = "\
- SELECT SUM(acctsessiontime - GREATEST((%%b - strftime('%%s', acctstarttime)), 0)) \
+ SELECT SUM(acctsessiontime - MAX((%%b - strftime('%%s', acctstarttime)), 0)) \
FROM radacct \
WHERE username = '%{${key}}' AND \
(strftime('%%s', acctstarttime) + acctsessiontime) > %%b"
diff --git a/raddb/mods-config/sql/counter/sqlite/weeklycounter.conf b/raddb/mods-config/sql/counter/sqlite/weeklycounter.conf
index 06ce3b6..90a8566 100644
--- a/raddb/mods-config/sql/counter/sqlite/weeklycounter.conf
+++ b/raddb/mods-config/sql/counter/sqlite/weeklycounter.conf
@@ -5,7 +5,7 @@
# below
#
query = "\
- SELECT SUM(acctsessiontime - GREATEST((%%b - strftime('%%s', acctstarttime)), 0)) \
+ SELECT SUM(acctsessiontime - MAX((%%b - strftime('%%s', acctstarttime)), 0)) \
FROM radacct \
WHERE username = '%{${key}}' \
AND (strftime('%%s', acctstarttime) + acctsessiontime) > %%b"