Removed hard-coded number now a #define

Preliminary work for the enterprise edition
This commit is contained in:
Luca 2016-07-09 09:58:13 +02:00
parent 2d2e735c99
commit c85fa80ddd
6 changed files with 33 additions and 5 deletions

View file

@ -57,21 +57,25 @@ function aggregateInterfaceStats(ifstats)
for _,key in pairs(keys) do
if(tot[key] == nil) then tot[key] = { } end
for k,v in pairs(_v[key]) do
if(_v[key] ~= nil) then
for k,v in pairs(_v[key]) do
--io.write(k.."\n")
if(tot[key][k] == nil) then tot[key][k] = 0 end
tot[key][k] = tot[key][k] + v
end
end
end
end
keys = { "tcpPacketStats" }
for _,key in pairs(keys) do
if(tot[key] == nil) then tot[key] = { } end
for k,v in pairs(_v[key]) do
if(_v[key] ~= nil) then
for k,v in pairs(_v[key]) do
--io.write(k.."\n")
if(tot[key][k] == nil) then tot[key][k] = 0 end
tot[key][k] = tot[key][k] + v
end
end
end