From a12f43e912ef50a524ee3980f126afbe4e9b5e4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibaut=20VAR=C3=88NE?= Date: Wed, 24 May 2023 12:29:01 +0200 Subject: [PATCH] uspot: accounting: s/client_flush/client_reset/g MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thibaut VARĂˆNE --- feeds/ucentral/uspot/files/usr/share/uspot/accounting.uc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/feeds/ucentral/uspot/files/usr/share/uspot/accounting.uc b/feeds/ucentral/uspot/files/usr/share/uspot/accounting.uc index c5cc95459..25b7e1508 100755 --- a/feeds/ucentral/uspot/files/usr/share/uspot/accounting.uc +++ b/feeds/ucentral/uspot/files/usr/share/uspot/accounting.uc @@ -178,7 +178,7 @@ function client_remove(interface, mac, reason) { client_kick(interface, mac, true); } -function client_flush(interface, mac, reason) { +function client_reset(interface, mac, reason) { syslog(interface, mac, reason); client_kick(interface, mac, false); } @@ -201,7 +201,7 @@ function accounting(interface) { if (list[mac].data.logoff) { radius_terminate(interface, mac, radtc_logout); - client_flush(interface, mac, 'logoff event'); + client_reset(interface, mac, 'logoff event'); continue; } @@ -213,13 +213,13 @@ function accounting(interface) { let timeout = +clients[interface][mac].session; if (timeout && ((t - list[mac].data.connect) > timeout)) { radius_terminate(interface, mac, radtc_sessionto); - client_flush(interface, mac, 'session timeout'); + client_reset(interface, mac, 'session timeout'); continue; } let maxtotal = +clients[interface][mac].max_total; if (maxtotal && ((list[mac].bytes_ul + list[mac].bytes_dl) >= maxtotal)) { radius_terminate(interface, mac, radtc_sessionto); - client_flush(interface, mac, 'max octets reached'); + client_reset(interface, mac, 'max octets reached'); } } }