mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Cleanup of unused volatile members
This commit is contained in:
parent
5d7abd0b53
commit
d21fe7d6e1
15 changed files with 10 additions and 497 deletions
|
|
@ -18,9 +18,6 @@ local language = _POST["user_language"]
|
|||
-- for captive portal users
|
||||
local old_host_pool_id = _POST["old_host_pool_id"]
|
||||
local new_host_pool_id = _POST["host_pool_id"]
|
||||
local limited_lifetime = _POST["lifetime_limited"]
|
||||
local unlimited_lifetime = _POST["lifetime_unlimited"]
|
||||
local lifetime_secs = tonumber((_POST["lifetime_secs"] or -1))
|
||||
|
||||
if(false) then
|
||||
io.write("\n")
|
||||
|
|
@ -74,18 +71,6 @@ if(language ~= nil) then
|
|||
end
|
||||
end
|
||||
|
||||
if(limited_lifetime ~= nil) then
|
||||
if not ntop.addUserLifetime(username, lifetime_secs) then
|
||||
print ("{ \"result\" : -1, \"message\" : \"Error in changing the host lifetime\" }")
|
||||
return
|
||||
end
|
||||
elseif(unlimited_lifetime ~= nil) then
|
||||
if not ntop.clearUserLifetime(username) then
|
||||
print ("{ \"result\" : -1, \"message\" : \"Error in clearing the host lifetime\" }")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if(new_host_pool_id ~= nil and old_host_pool_id ~= nil and new_host_pool_id ~= old_host_pool_id) then
|
||||
if(not ntop.changeUserHostPool(username, new_host_pool_id)) then
|
||||
print ("{ \"result\" : -1, \"message\" : \"Error in changing the host pool id\" }")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue