mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 01:22:25 +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)
|
||||
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 max_total = 0;
|
||||
|
||||
if (state.data?.radius?.reply) {
|
||||
interval = (state.data?.radius?.reply['Acct-Interim-Interval'] || acct_interval(interface)) * 1000;
|
||||
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);
|
||||
}
|
||||
let interval = (state.data?.radius?.reply['Acct-Interim-Interval'] || acct_interval(interface)) * 1000;
|
||||
let session = (state.data?.radius?.reply['Session-Timeout'] || session_timeout(interface));
|
||||
let idle = (state.data?.radius?.reply['Idle-Timeout'] || idle_timeout(interface));
|
||||
let max_total = (state.data?.radius?.reply['ChilliSpot-Max-Total-Octets'] || 0);
|
||||
|
||||
clients[interface][mac] = {
|
||||
accounting,
|
||||
|
||||
Reference in New Issue
Block a user