mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-30 01:52:51 +00:00
uspot: accounting: avoid redundant assignments
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
This commit is contained in:
committed by
John Crispin
parent
1cded2e983
commit
3e483bd524
@@ -177,18 +177,11 @@ function client_add(interface, mac, state) {
|
|||||||
if (state.state != 1)
|
if (state.state != 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let interval = acct_interval(interface) * 1000;
|
|
||||||
let idle = idle_timeout(interface);
|
|
||||||
let session = session_timeout(interface);
|
|
||||||
let accounting = (config[interface]?.acct_server && config[interface]?.acct_secret);
|
let accounting = (config[interface]?.acct_server && config[interface]?.acct_secret);
|
||||||
let max_total = 0;
|
let interval = (state.data?.radius?.reply['Acct-Interim-Interval'] || acct_interval(interface)) * 1000;
|
||||||
|
let session = (state.data?.radius?.reply['Session-Timeout'] || session_timeout(interface));
|
||||||
if (state.data?.radius?.reply) {
|
let idle = (state.data?.radius?.reply['Idle-Timeout'] || idle_timeout(interface));
|
||||||
interval = (state.data?.radius?.reply['Acct-Interim-Interval'] || acct_interval(interface)) * 1000;
|
let max_total = (state.data?.radius?.reply['ChilliSpot-Max-Total-Octets'] || 0);
|
||||||
idle = (state.data?.radius?.reply['Idle-Timeout'] || idle_timeout(interface));
|
|
||||||
session = (state.data?.radius?.reply['Session-Timeout'] || session_timeout(interface));
|
|
||||||
max_total = (state.data?.radius?.reply['ChilliSpot-Max-Total-Octets'] || 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
clients[interface][mac] = {
|
clients[interface][mac] = {
|
||||||
accounting,
|
accounting,
|
||||||
|
|||||||
Reference in New Issue
Block a user