mirror of
https://github.com/Icinga/icinga2.git
synced 2026-05-28 04:12:13 -04:00
parent
319b9b256a
commit
ceca27e25b
1 changed files with 2 additions and 6 deletions
|
|
@ -1024,18 +1024,14 @@ String Utility::GetFQDN(void)
|
|||
if (rc != 0)
|
||||
result = NULL;
|
||||
|
||||
String canonicalName;
|
||||
|
||||
if (result) {
|
||||
if (strcmp(result->ai_canonname, "localhost") != 0)
|
||||
canonicalName = result->ai_canonname;
|
||||
hostname = result->ai_canonname;
|
||||
|
||||
freeaddrinfo(result);
|
||||
} else {
|
||||
canonicalName = hostname;
|
||||
}
|
||||
|
||||
return canonicalName;
|
||||
return hostname;
|
||||
}
|
||||
|
||||
int Utility::Random(void)
|
||||
|
|
|
|||
Loading…
Reference in a new issue