mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
parent
cbd4c6d6ae
commit
1bec9692c6
@ -77,9 +77,11 @@ String CompatUtility::GetHostAddress(const Host::Ptr& host)
|
|||||||
|
|
||||||
String address;
|
String address;
|
||||||
|
|
||||||
if (macros) {
|
if (macros)
|
||||||
address = macros->Get("address");
|
address = macros->Get("address");
|
||||||
}
|
|
||||||
|
if (address.IsEmpty())
|
||||||
|
address = host->GetName();
|
||||||
|
|
||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
@ -92,9 +94,11 @@ String CompatUtility::GetHostAddress6(const Host::Ptr& host)
|
|||||||
|
|
||||||
String address6;
|
String address6;
|
||||||
|
|
||||||
if (macros) {
|
if (macros)
|
||||||
address6 = macros->Get("address6");
|
address6 = macros->Get("address6");
|
||||||
}
|
|
||||||
|
if (address6.IsEmpty())
|
||||||
|
address6 = host->GetName();
|
||||||
|
|
||||||
return address6;
|
return address6;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user