Fixes issues when sorting flows

Todo: check also host sort that may be affected as well

Fixes #464
This commit is contained in:
Simone Mainardi 2016-04-02 18:11:42 +02:00
parent d268c32d45
commit 27d9f37016
4 changed files with 71 additions and 25 deletions

View file

@ -104,12 +104,13 @@ end
-- ##########################################
function aggregateFlowsStats(flowstats)
-- TODO: prevent possible flow overlap when using interface views
if(flowstats == nil) then return(flowstats) end
local tot = 0
local res = { }
for ifname,_v in pairs(flowstats) do
for k,v in pairs(_v["flows"]) do
for k,v in ipairs(_v["flows"]) do
--io.write(k.."\n")
res[k] = v
end