mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Fixes wrong answer from listening_ports endpoint
This commit is contained in:
parent
a93c7f941f
commit
1499ec02d5
1 changed files with 4 additions and 5 deletions
|
|
@ -28,17 +28,16 @@ end
|
|||
local host = interface.getHostInfo(ip, vlan)
|
||||
|
||||
for listening_type, data in pairs(host.listening_ports or {}) do
|
||||
local process = {}
|
||||
|
||||
for port, process_info in pairs(data) do
|
||||
local process = {}
|
||||
process["tcp_udp"] = listening_type
|
||||
process["port"] = port
|
||||
process["package"] = process_info["package"]
|
||||
process["process"] = process_info["process"]
|
||||
end
|
||||
|
||||
if table.len(process) > 0 then
|
||||
res[#res + 1] = process
|
||||
if table.len(process) > 0 then
|
||||
res[#res + 1] = process
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue