(file) Return to System.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/System.cpp between version 1.26 and 1.27

version 1.26, 2005/02/06 21:13:14 version 1.27, 2005/03/08 02:54:34
Line 169 
Line 169 
     struct hostent * phostent;     struct hostent * phostent;
     struct in_addr   inaddr;     struct in_addr   inaddr;
     String ipAddress = String::EMPTY;     String ipAddress = String::EMPTY;
       CString csName = hostName.getCString();
       const char * ccName = csName;
   #ifndef PEGASUS_OS_OS400
       if ((phostent = ::gethostbyname(ccName)) != NULL)
   #else
     if ((phostent = ::gethostbyname((const char *)hostName.getCString())) != NULL)     if ((phostent = ::gethostbyname((const char *)hostName.getCString())) != NULL)
   #endif
     {     {
         ::memcpy( &inaddr, phostent->h_addr,4);         ::memcpy( &inaddr, phostent->h_addr,4);
 #ifdef PEGASUS_PLATFORM_ZOS_ZSERIES_IBM #ifdef PEGASUS_PLATFORM_ZOS_ZSERIES_IBM
Line 275 
Line 280 
         {         {
                 // resolve hostaddr to a real host entry                 // resolve hostaddr to a real host entry
                 // casting to (const char *) as (char *) will work as (void *) too, those it fits all platforms                 // casting to (const char *) as (char *) will work as (void *) too, those it fits all platforms
   #ifndef PEGASUS_OS_OS400
                 entry = gethostbyaddr((const char *) &tmp_addr, sizeof(tmp_addr), AF_INET);                 entry = gethostbyaddr((const char *) &tmp_addr, sizeof(tmp_addr), AF_INET);
   #else
                   entry = gethostbyaddr((const char *) &tmp_addr, sizeof(tmp_addr), AF_INET);
   #endif
                 if (entry == 0)                 if (entry == 0)
                 {                 {
                         // error, couldn't resolve the ip                         // error, couldn't resolve the ip


Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2