First code cleanup for better memory management

This commit is contained in:
Matteo Biscosi 2024-02-14 16:12:28 +00:00
parent b5a4c2621b
commit 2f76c9bf4b
21 changed files with 968 additions and 852 deletions

View file

@ -4,13 +4,15 @@
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
local radius_handler = require "radius_handler"
local host_pools = require "host_pools"
-- #################################################################
if radius_handler.isAccountingEnabled() then
-- Import only if radius is enabled, otherwise it's a waste of memory
require "lua_utils"
local host_pools = require "host_pools"
-- Instantiate host pools
local pool = host_pools:create()
local pools_list = {}