Refactor internal scripts for cleaner code

This commit is contained in:
emanuele-f 2019-12-31 16:53:24 +01:00
parent 7a2def354a
commit 458a773a93
9 changed files with 128 additions and 109 deletions

View file

@ -32,7 +32,7 @@ SyslogLuaEngine::SyslogLuaEngine(NetworkInterface *iface) : LuaEngine() {
ntop->fixPath(script_path);
if (run_script(script_path, iface, true /* Load only */) < 0) {
if(load_script(script_path, iface) < 0) {
ntop->getTrace()->traceEvent(TRACE_ERROR, "Failure loading %s", script_path);
return;
}