Fixed #4896 service map nodes have numerical label even though a symbolic name exists

This commit is contained in:
Matteo Biscosi 2021-01-11 17:42:40 +01:00
parent 31ef728242
commit 4586833114
6 changed files with 56 additions and 0 deletions

View file

@ -1477,6 +1477,11 @@ function hostinfo2label(host_info)
-- Name info from C (e.g. DHCP name)
if not isEmptyString(host_info["name"]) then
return host_info["name"]
else
local name = interface.getHostName(ip, host_info["vlan"])
if name ~= nil and not isEmptyString(name) then
return name
end
end
-- Try to get the resolved name