mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 23:24:09 +02:00
parent
319b9b256a
commit
ceca27e25b
@ -1024,18 +1024,14 @@ String Utility::GetFQDN(void)
|
|||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
result = NULL;
|
result = NULL;
|
||||||
|
|
||||||
String canonicalName;
|
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
if (strcmp(result->ai_canonname, "localhost") != 0)
|
if (strcmp(result->ai_canonname, "localhost") != 0)
|
||||||
canonicalName = result->ai_canonname;
|
hostname = result->ai_canonname;
|
||||||
|
|
||||||
freeaddrinfo(result);
|
freeaddrinfo(result);
|
||||||
} else {
|
|
||||||
canonicalName = hostname;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return canonicalName;
|
return hostname;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Utility::Random(void)
|
int Utility::Random(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user