Added category renaming cleanup at startup

This commit is contained in:
Matteo Biscosi 2024-01-31 10:14:37 +00:00
parent 878d514ba8
commit 80b5b9fb3c
3 changed files with 38 additions and 3 deletions

View file

@ -634,7 +634,7 @@ end
-- ##############################################
local function getCustomnDPIProtoCategoriesKey()
function getCustomnDPIProtoCategoriesKey()
return "ntop.prefs.custom_nDPI_proto_categories"
end
@ -652,6 +652,16 @@ end
-- ##############################################
function removeCustomnDPIProtoCategory(app_id)
local key = getCustomnDPIProtoCategoriesKey()
-- NOTE: when the ndpi struct changes, the custom associations are
-- reloaded by Ntop::loadProtocolsAssociations
ntop.delHashCache(key, tostring(app_id));
end
-- ##############################################
function getHumanReadableInterfaceName(interface_name)
local interface_id = nil