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

Diff for /pegasus/src/Pegasus/Repository/CIMRepository.cpp between version 1.127 and 1.128

version 1.127, 2004/08/26 09:14:08 version 1.128, 2004/09/15 13:03:47
Line 1173 
Line 1173 
 /*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
   Checks whether a hostname points to the local CIMOM   Checks whether a hostname points to the local CIMOM
 ------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
 static Boolean isLocalCIMOMHostAndPort( const String& hostname )  static Boolean isLocalCIMOM( const String& hostname )
 { {
    PEG_METHOD_ENTER(TRC_REPOSITORY, "CIMRepository::isLocalCIMOMHostAndPort");     PEG_METHOD_ENTER(TRC_REPOSITORY, "CIMRepository::isLocalCIMOM");
  
    // First do a brute force check for equality of the strings    // First do a brute force check for equality of the strings
    if( String::equalNoCase(hostname,System::getHostName()))    if( String::equalNoCase(hostname,System::getHostName()))
Line 1184 
Line 1184 
       return true;       return true;
    }    }
  
    String hn = hostname;  
   
    // ------------------------------------------------------------------------    // ------------------------------------------------------------------------
    // Match the port numbers     // Strip of the port numbers
    // ------------------------------------------------------------------------    // ------------------------------------------------------------------------
    String port, localPort, localSPort;     String hn = hostname;
  
    Uint32 index = hostname.find(':');    Uint32 index = hostname.find(':');
    if ( index != PEG_NOT_FOUND )    if ( index != PEG_NOT_FOUND )
    {    {
       port = hostname.subString(index+1);  
       hn = hostname.subString(0,index);       hn = hostname.subString(0,index);
   
       ConfigManager *cfgMgr = ConfigManager::getInstance();  
   
       localPort  =  cfgMgr->getCurrentValue("httpPort");  
       localSPort =  cfgMgr->getCurrentValue("httpsPort");  
   
       if (!String::equal(port,localPort) &&  
           !String::equal(port,localSPort) )  
       {  
          PEG_METHOD_EXIT();  
          return false;  
       }  
    }    }
  
    // ------------------------------------------------------------------------    // ------------------------------------------------------------------------
Line 1285 
Line 1270 
                     // Fix for bugzilla 667:                     // Fix for bugzilla 667:
                     // Strip off the hostname if it is the same as the local host                     // Strip off the hostname if it is the same as the local host
                     if ((fromRef.getHost() != String::EMPTY) &&                     if ((fromRef.getHost() != String::EMPTY) &&
                         (isLocalCIMOMHostAndPort(fromRef.getHost())))                          (isLocalCIMOM(fromRef.getHost())))
                     {                     {
                        PEG_TRACE_STRING(TRC_REPOSITORY, Tracer::LEVEL4, "_createAssocInstEntries() - Stripping of local hostName from fromRef");                        PEG_TRACE_STRING(TRC_REPOSITORY, Tracer::LEVEL4, "_createAssocInstEntries() - Stripping of local hostName from fromRef");
                        fromRef.setHost(String::EMPTY);                        fromRef.setHost(String::EMPTY);
Line 1302 
Line 1287 
  
                     // Strip off the hostname if it is the same as the local host                     // Strip off the hostname if it is the same as the local host
                     if ((toRef.getHost() != String::EMPTY) &&                     if ((toRef.getHost() != String::EMPTY) &&
                         (isLocalCIMOMHostAndPort(toRef.getHost())))                          (isLocalCIMOM(toRef.getHost())))
                     {                     {
                        PEG_TRACE_STRING(TRC_REPOSITORY, Tracer::LEVEL4, "_createAssocInstEntries() - Stripping of local hostName from toRef");                        PEG_TRACE_STRING(TRC_REPOSITORY, Tracer::LEVEL4, "_createAssocInstEntries() - Stripping of local hostName from toRef");
                        toRef.setHost(String::EMPTY);                        toRef.setHost(String::EMPTY);


Legend:
Removed from v.1.127  
changed lines
  Added in v.1.128

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2