mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-03 17:30:11 +00:00
Fixes port names not correctly formatted
This commit is contained in:
parent
832a7de8fe
commit
1d48ea3535
1 changed files with 7 additions and 1 deletions
|
|
@ -1006,8 +1006,14 @@ function format_portidx_name(device_ip, portidx, short_version)
|
|||
cached_val = cache_utils.getifname(device_ip, portidx)
|
||||
|
||||
if (cached_val ~= nil) then
|
||||
local num_value = tonumber(cached_val)
|
||||
if(num_value and (num_value == tonumber(portidx))) then
|
||||
-- With integer it seems there is some problem when caching the value
|
||||
-- returning values like 6.00000 instead of 6
|
||||
return(portidx)
|
||||
end
|
||||
if(short_version) then
|
||||
cached_val = shortenString(cached_val, 26)
|
||||
cached_val = shortenString(cached_val, 26)
|
||||
end
|
||||
|
||||
-- if(cached_val ~= portidx) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue