mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Fix populate_l7_protocols
This commit is contained in:
parent
3c7c973e29
commit
6601d2feba
1 changed files with 2 additions and 3 deletions
|
|
@ -17,12 +17,11 @@ local db_utils = {}
|
|||
local function populate_l7_protocols()
|
||||
-- Protocols table
|
||||
local list = interface.getnDPIProtocols() or {}
|
||||
local sql = string.format("INSERT INTO ntopng.l7_protocols (*) Values")
|
||||
for proto_name, proto_id in pairs(available_protocols) do
|
||||
local sql = "INSERT INTO ntopng.l7_protocols (*) Values"
|
||||
for proto_name, proto_id in pairs(list) do
|
||||
-- traceError(TRACE_NORMAL, TRACE_CONSOLE, "Adding Protocol: " .. proto_name .. ", ID: " .. proto_id)
|
||||
sql = string.format("%s (%u, '%s')", sql, tonumber(proto_id), proto_name)
|
||||
end
|
||||
|
||||
interface.execSQLQuery(sql)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue