mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Fixes possible crash on custom application editing
This commit is contained in:
parent
de544cb1f9
commit
3f703ca062
3 changed files with 14 additions and 21 deletions
|
|
@ -640,23 +640,6 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
function getCustomnDPIProtoCategories()
|
||||
local ndpi_protos = interface.getnDPIProtocols()
|
||||
local key = getCustomnDPIProtoCategoriesKey()
|
||||
|
||||
local res = {}
|
||||
for _, app_id in pairs(ndpi_protos) do
|
||||
local custom_category = ntop.getHashCache(key, tostring(app_id))
|
||||
if not isEmptyString(custom_category) then
|
||||
res[tonumber(app_id)] = tonumber(custom_category)
|
||||
end
|
||||
end
|
||||
|
||||
return res
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
function setCustomnDPIProtoCategory(app_id, new_cat_id)
|
||||
ntop.setnDPIProtoCategory(app_id, new_cat_id)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue