![]() ![]() |
![]() |
version 1.54, 2005/06/10 18:28:45 | version 1.55, 2005/10/05 20:45:21 | ||
---|---|---|---|
|
| ||
String System::getHostName() | String System::getHostName() | ||
{ | { | ||
static char hostname[PEGASUS_MAXHOSTNAMELEN]; | static char hostname[PEGASUS_MAXHOSTNAMELEN + 1]; | ||
if (!*hostname) | if (!*hostname) | ||
{ | |||
gethostname(hostname, sizeof(hostname)); | gethostname(hostname, sizeof(hostname)); | ||
} | |||
hostname[sizeof(hostname)-1] = 0; | |||
return hostname; | return hostname; | ||
} | } |
|
No CVS admin address has been configured |
Powered by ViewCVS 0.9.2 |