mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Avoid flow.lua overhead if all the modules are disabled
This commit is contained in:
parent
e31afe72d6
commit
e4f1d1f5d3
4 changed files with 45 additions and 8 deletions
|
|
@ -465,7 +465,20 @@ function mud_utils.getHostMUDRecordingPref(ifid, host_key)
|
|||
end
|
||||
|
||||
function mud_utils.setHostMUDRecordingPref(ifid, host_key, val)
|
||||
ntop.setPref(getHostMUDRecordingKey(ifid, host_key), val)
|
||||
local key = getHostMUDRecordingKey(ifid, host_key)
|
||||
|
||||
if(val == "disabled") then
|
||||
ntop.delCache(key)
|
||||
else
|
||||
ntop.setPref(key, val)
|
||||
end
|
||||
end
|
||||
|
||||
-- ###########################################
|
||||
|
||||
function mud_utils.isMUDRecordingEnabled(ifid)
|
||||
local pattern = getHostMUDRecordingKey(ifid, "*")
|
||||
return(table.len(ntop.getKeysCache(pattern)) > 0)
|
||||
end
|
||||
|
||||
-- ###########################################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue