Fixes various lua memory issues

This commit is contained in:
Matteo Biscosi 2024-02-22 11:21:38 +00:00
parent eb52f62b1e
commit 5edfdeedcd
53 changed files with 336 additions and 551 deletions

View file

@ -654,25 +654,6 @@ function setHostNotes(host_info, notes)
ntop.setCache(getHostNotesKey(host_key), notes)
end
-- ##############################################
function mac2label(mac)
local alt_name = getHostAltName(mac)
if not isEmptyString(alt_name) and (alt_name ~= mac) then
return(alt_name)
end
alt_name = ntop.getCache(getDhcpNameKey(interface.getId(), mac))
if not isEmptyString(alt_name) and (alt_name ~= mac) then
return(alt_name)
end
-- Fallback: just the MAC
return(mac)
end
-- ##############################################