Fixes host alerts key generation

This commit is contained in:
Simone Mainardi 2019-07-15 22:54:09 +02:00
parent 0d04f24881
commit cc97be85ca
2 changed files with 3 additions and 4 deletions

View file

@ -1630,9 +1630,8 @@ function hostinfo2hostkey(host_info,host_type,show_vlan)
end
end
if(((host_info["vlan"] ~= nil) and (host_info["vlan"] ~= 0))
or ((show_vlan ~= nil) and show_vlan and (host_info["vlan"] ~= nil))) then
rsp = rsp..'@'..tostring(host_info["vlan"])
if((host_info["vlan"] ~= nil and host_info["vlan"] ~= 0) or show_vlan) then
rsp = rsp..'@'..tostring(host_info["vlan"] or 0)
end
if(debug_host) then traceError(TRACE_DEBUG,TRACE_CONSOLE,"HOST2URL => ".. rsp .. "\n") end