Fixes possible collisions when looking up flows by key

This commit is contained in:
Simone Mainardi 2019-10-16 19:04:10 +02:00
parent 6533175336
commit 6fd7386c03
24 changed files with 146 additions and 125 deletions

View file

@ -11,15 +11,9 @@ local json = require "dkjson"
sendHTTPHeader('text/json')
local flow_key = _GET["flow_key"]
local flow
local flow = interface.findFlowByKeyAndHashId(tonumber(flow_key), 0 --[[ TODO --]])
local tree = {}
if(flow_key == nil) then
flow = nil
else
flow = interface.findFlowByKey(tonumber(flow_key))
end
local function format_proc(name, pid)
return string.format("%s [pid: %u]", name, pid)
end