MCPcopy Create free account
hub / github.com/Icinga/icinga2 / GetHostName

Method GetHostName

lib/base/utility.cpp:1423–1431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1421}
1422
1423String Utility::GetHostName()
1424{
1425 char name[255];
1426
1427 if (gethostname(name, sizeof(name)) < 0)
1428 return "localhost";
1429
1430 return name;
1431}
1432
1433/**
1434 * Returns the fully-qualified domain name for the host

Callers 5

MakeNameMethod · 0.80
MakeNameMethod · 0.80
MakeNameMethod · 0.80
MakeNameMethod · 0.80
MakeNameMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected