Don't calculate Acct-Delay-Time out of Start|Stop-Time AND still log it to database.
authorpnixon <pnixon>
Fri, 13 Jul 2007 20:59:39 +0000 (20:59 +0000)
committerpnixon <pnixon>
Fri, 13 Jul 2007 20:59:39 +0000 (20:59 +0000)
raddb/sql/postgresql-dialup.conf

index 5ad0d4c..7d647c7 100644 (file)
     SET AcctStopTime = ('%S'::timestamp - '%{Acct-Delay-Time:-0}'::interval), \
     AcctSessionTime = (EXTRACT(EPOCH FROM ('%S'::timestamp with time zone - AcctStartTime::timestamp with time zone \
     - '%{Acct-Delay-Time:-0}'::interval)))::BIGINT, \
-    AcctTerminateCause='%{Acct-Terminate-Cause}', AcctStopDelay = '%{Acct-Delay-Time:-0}' \
+    AcctTerminateCause='%{Acct-Terminate-Cause}', AcctStopDelay = 0 \
     WHERE AcctSessionTime IS NULL AND AcctStopTime IS NULL AND NASIPAddress= '%{NAS-IP-Address}' AND AcctStartTime <= '%S'::timestamp"
 
   accounting_update_query = "UPDATE ${acct_table1} \
     '%{Service-Type}', \
     '%{Framed-Protocol}', \
     NULLIF('%{Framed-IP-Address}', '')::inet, \
-    '%{Acct-Delay-Time:-0}', \
+    0', \
     '%{X-Ascend-Session-Svr-Key}')"
 
   accounting_start_query_alt  = "UPDATE ${acct_table1} \
-    SET AcctStartTime = ('%S'::timestamp - '%{Acct-Delay-Time:-0}'::interval), AcctStartDelay = '%{Acct-Delay-Time:-0}', \
+    SET AcctStartTime = ('%S'::timestamp - '%{Acct-Delay-Time:-0}'::interval), \
+    AcctStartDelay = 0, \
     ConnectInfo_start = '%{Connect-Info}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' \
     AND NASIPAddress = '%{NAS-IP-Address}' AND AcctStopTime IS NULL"
 
     - '%{Acct-Delay-Time:-0}'::INTERVAL)))::BIGINT ELSE '%{Acct-Session-Time}' END, \
     AcctInputOctets = (('%{Acct-Input-Gigawords:-0}'::bigint << 32) + '%{Acct-Input-Octets:-0}'::bigint), \
     AcctOutputOctets = (('%{Acct-Output-Gigawords:-0}'::bigint << 32) + '%{Acct-Output-Octets:-0}'::bigint), \
-    AcctTerminateCause = '%{Acct-Terminate-Cause}', AcctStopDelay = '%{Acct-Delay-Time:-0}', \
+    AcctTerminateCause = '%{Acct-Terminate-Cause}', AcctStopDelay = 0, \
     FramedIPAddress = NULLIF('%{Framed-IP-Address}', '')::inet, ConnectInfo_stop = '%{Connect-Info}' \
     WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' \
     AND NASIPAddress = '%{NAS-IP-Address}' AND AcctStopTime IS NULL"
     '%{Connect-Info}', (('%{Acct-Input-Gigawords:-0}'::bigint << 32) + '%{Acct-Input-Octets:-0}'::bigint), \
     (('%{Acct-Output-Gigawords:-0}'::bigint << 32) + '%{Acct-Output-Octets:-0}'::bigint), '%{Called-Station-Id}', \
     '%{Calling-Station-Id}', '%{Acct-Terminate-Cause}', '%{Service-Type}', '%{Framed-Protocol}', \
-    NULLIF('%{Framed-IP-Address}', '')::inet, '%{Acct-Delay-Time:-0}')"
+    NULLIF('%{Framed-IP-Address}', '')::inet, 0)"
 
        #######################################################################
        # Group Membership Queries