mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
More robust plugins loading and error reporting
This prevents malformed scripts in plugins from breaking ntopng
This commit is contained in:
parent
83f30ec0f3
commit
e9a081903c
5 changed files with 213 additions and 65 deletions
|
|
@ -630,7 +630,7 @@ function user_scripts.loadModule(ifid, script_type, subdir, mod_fname)
|
|||
local full_path = os_utils.fixPath(checks_dir .. "/" .. mod_fname .. ".lua")
|
||||
|
||||
if ntop.exists(full_path) then
|
||||
return(assert(loadfile(full_path))())
|
||||
return(dofile(full_path))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue