Fix address and address6 being empty in objects.cache

fixes #5352
This commit is contained in:
Johannes Meyer 2013-12-17 09:50:19 +01:00
parent cbd4c6d6ae
commit 1bec9692c6
1 changed files with 8 additions and 4 deletions

View File

@ -77,9 +77,11 @@ String CompatUtility::GetHostAddress(const Host::Ptr& host)
String address;
if (macros) {
if (macros)
address = macros->Get("address");
}
if (address.IsEmpty())
address = host->GetName();
return address;
}
@ -92,9 +94,11 @@ String CompatUtility::GetHostAddress6(const Host::Ptr& host)
String address6;
if (macros) {
if (macros)
address6 = macros->Get("address6");
}
if (address6.IsEmpty())
address6 = host->GetName();
return address6;
}