(file) Return to Server.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / ControlProviders / InteropProvider

Diff for /pegasus/src/Pegasus/ControlProviders/InteropProvider/Server.cpp between version 1.5.4.1 and 1.8

version 1.5.4.1, 2008/02/22 23:13:52 version 1.8, 2008/05/12 09:14:52
Line 49 
Line 49 
  
  
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
   #include <Pegasus/Common/HostAddress.h>
 #include <Pegasus/Common/PegasusVersion.h> #include <Pegasus/Common/PegasusVersion.h>
  
 #include <cctype> #include <cctype>
Line 321 
Line 322 
             sprintf(buffer, "%u", portNumberHttp);             sprintf(buffer, "%u", portNumberHttp);
             httpPort.assign(buffer);             httpPort.assign(buffer);
         }         }
         CIMInstance instance =          CIMInstance instance;
           Array<String> ips;
   #ifdef PEGASUS_ENABLE_IPV6
           ips = System::getInterfaceAddrs();
           for (Uint32 i = 0; i < ips.size() ; ++i)
           {
               String addr = ips[i];
               if (HostAddress::isValidIPV6Address(ips[i]))
               {
                   addr = "[" + addr + "]";
               }
               addr.append(":");
               addr.append(httpPort);
   
               instance  =
             buildCIMXMLCommunicationMechanismInstance(             buildCIMXMLCommunicationMechanismInstance(
                 namespaceType,                 namespaceType,
                 namespaceAccessProtocol,                 namespaceAccessProtocol,
                       addr,
                       commMechClass);
               instances.append(instance);
           }
   #endif
           // If System::getInterfaceAddrs() fails add ip4 addr here.
           if (!ips.size())
           {
               instance  = buildCIMXMLCommunicationMechanismInstance(
                   namespaceType,
                   namespaceAccessProtocol,
                 getHostAddress(hostName, namespaceAccessProtocol, httpPort),                 getHostAddress(hostName, namespaceAccessProtocol, httpPort),
                 commMechClass);                 commMechClass);
         instances.append(instance);         instances.append(instance);
     }     }
       }
  
     if (enableHttpsConnection)     if (enableHttpsConnection)
     {     {
Line 344 
Line 371 
             sprintf(buffer, "%u", portNumberHttps);             sprintf(buffer, "%u", portNumberHttps);
             httpsPort.assign(buffer);             httpsPort.assign(buffer);
         }         }
         CIMInstance instance =          CIMInstance instance;
           Array<String> ips;
   #ifdef PEGASUS_ENABLE_IPV6
           ips = System::getInterfaceAddrs();
           for (Uint32 i = 0; i < ips.size() ; ++i)
           {
               String addr = ips[i];
               if (HostAddress::isValidIPV6Address(ips[i]))
               {
                   addr = "[" + addr + "]";
               }
               addr.append(":");
               addr.append(httpsPort);
               instance  =
             buildCIMXMLCommunicationMechanismInstance(             buildCIMXMLCommunicationMechanismInstance(
                 namespaceType,                 namespaceType,
                 namespaceAccessProtocol,                 namespaceAccessProtocol,
                       addr,
                       commMechClass);
               instances.append(instance);
           }
   #endif
           // If System::getInterfaceAddrs() fails add ip4 addr here.
           if (!ips.size())
           {
               instance  = buildCIMXMLCommunicationMechanismInstance(
                   namespaceType,
                   namespaceAccessProtocol,
                 getHostAddress(hostName, namespaceAccessProtocol, httpsPort),                 getHostAddress(hostName, namespaceAccessProtocol, httpsPort),
                 commMechClass);                 commMechClass);
   
         instances.append(instance);         instances.append(instance);
     }     }
       }
  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
     return instances;     return instances;
Line 520 
Line 571 
     // Modify the instance on disk     // Modify the instance on disk
     repository->modifyInstance(instanceReference.getNameSpace(),     repository->modifyInstance(instanceReference.getNameSpace(),
         omInstance, false,  propertyList);         omInstance, false,  propertyList);
     Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,      PEG_TRACE((
         "Interop Provider Set Statistics gathering in CIM_ObjectManager: $0",          TRC_CONTROLPROVIDER,
         (statisticsFlag? "true" : "false"));          Tracer::LEVEL3,
           "Interop Provider Set Statistics gathering in CIM_ObjectManager: %s",
           (statisticsFlag? "true" : "false")));
     StatisticalData* sd = StatisticalData::current();     StatisticalData* sd = StatisticalData::current();
     sd->setCopyGSD(statisticsFlag);     sd->setCopyGSD(statisticsFlag);
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();


Legend:
Removed from v.1.5.4.1  
changed lines
  Added in v.1.8

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2