From: Alan T. DeKok Date: Wed, 9 Mar 2016 22:20:15 +0000 (-0500) Subject: Enable simul_count_query X-Git-Tag: release_3_0_12~188 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8fd4c99f266fbed67a40ebf49d3ad8cdf084a708;p=thirdparty%2Ffreeradius-server.git Enable simul_count_query There's no reason to disable it in the default configuration. --- diff --git a/raddb/mods-config/sql/main/mysql/queries.conf b/raddb/mods-config/sql/main/mysql/queries.conf index 75611ad6f78..40508024d5f 100644 --- a/raddb/mods-config/sql/main/mysql/queries.conf +++ b/raddb/mods-config/sql/main/mysql/queries.conf @@ -163,14 +163,11 @@ authorize_group_reply_query = "\ # - Note that the returned field order should not be changed. ####################################################################### -# -# Uncomment simul_count_query to enable simultaneous use checking -# -#simul_count_query = "\ -# SELECT COUNT(*) \ -# FROM ${acct_table1} \ -# WHERE username = '%{SQL-User-Name}' \ -# AND acctstoptime IS NULL" +simul_count_query = "\ + SELECT COUNT(*) \ + FROM ${acct_table1} \ + WHERE username = '%{SQL-User-Name}' \ + AND acctstoptime IS NULL" simul_verify_query = "\ SELECT \ diff --git a/raddb/mods-config/sql/main/oracle/queries.conf b/raddb/mods-config/sql/main/oracle/queries.conf index 2df2d3b8ae6..387bcf97daa 100644 --- a/raddb/mods-config/sql/main/oracle/queries.conf +++ b/raddb/mods-config/sql/main/oracle/queries.conf @@ -133,14 +133,11 @@ authorize_group_reply_query = "\ # - Note that the returned field order should not be changed. ####################################################################### -# -# Uncomment simul_count_query to enable simultaneous use checking -# -#simul_count_query = "\ -# SELECT COUNT(*) \ -# FROM ${acct_table1} \ -# WHERE UserName = '%{SQL-User-Name}' \ -# AND AcctStopTime IS NULL" +simul_count_query = "\ + SELECT COUNT(*) \ + FROM ${acct_table1} \ + WHERE UserName = '%{SQL-User-Name}' \ + AND AcctStopTime IS NULL" simul_verify_query = "\ SELECT \ diff --git a/raddb/mods-config/sql/main/postgresql/queries.conf b/raddb/mods-config/sql/main/postgresql/queries.conf index 962f4f00b66..c33581cf755 100644 --- a/raddb/mods-config/sql/main/postgresql/queries.conf +++ b/raddb/mods-config/sql/main/postgresql/queries.conf @@ -166,21 +166,18 @@ authorize_group_reply_query = "\ # - Note that the returned field order should not be changed. ####################################################################### -# -# Uncomment simul_count_query to enable simultaneous use checking -# -#simul_count_query = "\ -# SELECT COUNT(*) \ -# FROM ${acct_table1} \ -# WHERE UserName='%{SQL-User-Name}' \ -# AND AcctStopTime IS NULL" - -#simul_verify_query = "\ -# SELECT RadAcctId, AcctSessionId, UserName, NASIPAddress, NASPortId, FramedIPAddress, CallingStationId, \ -# FramedProtocol \ -# FROM ${acct_table1} \ -# WHERE UserName='%{SQL-User-Name}' \ -# AND AcctStopTime IS NULL" +simul_count_query = "\ + SELECT COUNT(*) \ + FROM ${acct_table1} \ + WHERE UserName='%{SQL-User-Name}' \ + AND AcctStopTime IS NULL" + +simul_verify_query = "\ + SELECT RadAcctId, AcctSessionId, UserName, NASIPAddress, NASPortId, FramedIPAddress, CallingStationId, \ + FramedProtocol \ + FROM ${acct_table1} \ + WHERE UserName='%{SQL-User-Name}' \ + AND AcctStopTime IS NULL" ####################################################################### # Group Membership Queries diff --git a/raddb/mods-config/sql/main/sqlite/queries.conf b/raddb/mods-config/sql/main/sqlite/queries.conf index ae1f8be293c..b4118c22a60 100644 --- a/raddb/mods-config/sql/main/sqlite/queries.conf +++ b/raddb/mods-config/sql/main/sqlite/queries.conf @@ -153,14 +153,11 @@ authorize_group_reply_query = "\ # - Note that the returned field order should not be changed. ####################################################################### -# -# Uncomment simul_count_query to enable simultaneous use checking -# -#simul_count_query = "\ -# SELECT COUNT(*) \ -# FROM ${acct_table1} \ -# WHERE username = '%{SQL-User-Name}' \ -# AND acctstoptime IS NULL" +simul_count_query = "\ + SELECT COUNT(*) \ + FROM ${acct_table1} \ + WHERE username = '%{SQL-User-Name}' \ + AND acctstoptime IS NULL" simul_verify_query = "\ SELECT radacctid, acctsessionid, username, nasipaddress, nasportid, framedipaddress, \