version 1.39, 2004/07/08 00:44:59
|
version 1.40, 2004/07/19 08:46:23
|
|
|
// | // |
// Modified By: Dave Rosckes (rosckes@us.ibm.com) | // Modified By: Dave Rosckes (rosckes@us.ibm.com) |
// Terry Martin, Hewlett-Packard Company (terry.martin@hp.com) | // Terry Martin, Hewlett-Packard Company (terry.martin@hp.com) |
|
// Amit K Arora, IBM (amita@in.ibm.com) for Bug#1428 |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
| |
String System::getFullyQualifiedHostName () | String System::getFullyQualifiedHostName () |
{ | { |
// |
static char FQHostName[PEGASUS_MAXHOSTNAMELEN]; |
// ATTN: Implement this method to return the fully qualified host name |
|
// |
if (!*FQHostName) |
|
{ |
|
String hostname = getHostName(); |
|
struct hostent* hostEnt; |
|
|
|
hostEnt = gethostbyname((const char *)hostname.getCString()); |
|
if (hostEnt == NULL) |
|
{ |
return String::EMPTY; | return String::EMPTY; |
} | } |
|
strcpy(FQHostName, hostEnt->h_name); |
|
} |
|
|
|
return FQHostName; |
|
} |
| |
String System::getSystemCreationClassName () | String System::getSystemCreationClassName () |
{ | { |