mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 16:30:10 +00:00
Fixes a nil-key table access
The following error has been fixed: 28/Dec/2015 11:40:02 [Lua.cpp:4447] WARNING: Script failure [/Users/simone/code/ntopng/scripts/callbacks/minute.lua][...s/simone/code/ntopng/scripts/lua/modules/top_talkers.lua:221: table index is nil]
This commit is contained in:
parent
bb3bb48f11
commit
677d32672d
1 changed files with 2 additions and 1 deletions
|
|
@ -214,7 +214,8 @@ function groupStatsByColumn(ifid, ifname, col)
|
|||
for _key, value in pairs(hosts_stats) do
|
||||
key = hosts_stats[_key][col]
|
||||
|
||||
if ((col == "country" and key == "") or
|
||||
if ((not key) or
|
||||
(col == "country" and key == "") or
|
||||
(col == "local_network_id" and key == -1) or
|
||||
(col == "os" and key == "")) then goto continue end
|
||||
if (_group[key] == nil) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue