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

Diff for /pegasus/src/Server/cimserver.cpp between version 1.39 and 1.44

version 1.39, 2002/02/20 23:59:02 version 1.44, 2002/05/03 18:15:13
Line 88 
Line 88 
 #include <Pegasus/Common/Tracer.h> #include <Pegasus/Common/Tracer.h>
 #include <Pegasus/Config/ConfigManager.h> #include <Pegasus/Config/ConfigManager.h>
 #include <Pegasus/Client/CIMClient.h> #include <Pegasus/Client/CIMClient.h>
 #include <Pegasus/Common/HTTPConnector.h>  
 #include <Pegasus/Server/ShutdownService.h> #include <Pegasus/Server/ShutdownService.h>
 #include <Pegasus/Common/Destroyer.h> #include <Pegasus/Common/Destroyer.h>
 #ifndef PEGASUS_OS_ZOS  #if !defined(PEGASUS_OS_ZOS) && ! defined(PEGASUS_OS_HPUX)
 #include <slp/slp.h> #include <slp/slp.h>
 #endif #endif
  
Line 132 
Line 131 
  
 static const char OPTION_TIMEOUT     = 'T'; static const char OPTION_TIMEOUT     = 'T';
  
 static const String NAMESPACE = "root/cimv2";  static const String NAMESPACE = "root/PG_Internal";
 static const String CLASSNAME_SHUTDOWNSERVICE = "PG_ShutdownService"; static const String CLASSNAME_SHUTDOWNSERVICE = "PG_ShutdownService";
 static const String PROPERTY_TIMEOUT = "operationTimeout"; static const String PROPERTY_TIMEOUT = "operationTimeout";
  
Line 222 
Line 221 
     //     //
     // Create CIMClient object     // Create CIMClient object
     //     //
     Monitor* monitor = new Monitor;      CIMClient client;
     HTTPConnector* httpConnector = new HTTPConnector(monitor);  
     CIMClient client(monitor, httpConnector);  
  
     //     //
     // Get the port number     // Get the port number
Line 244 
Line 241 
     //     //
     try     try
     {     {
         client.connect(hostStr.allocateCString());          client.connectLocal();
     }     }
     catch(Exception& e)      catch(CIMClientException& e)
     {     {
         Logger::put(Logger::STANDARD_LOG, "CIMServer", Logger::INFORMATION,         Logger::put(Logger::STANDARD_LOG, "CIMServer", Logger::INFORMATION,
             "Failed to connect to $0 $1.", PEGASUS_NAME, e.getMessage());             "Failed to connect to $0 $1.", PEGASUS_NAME, e.getMessage());
Line 271 
Line 268 
         Array<CIMParamValue> inParams;         Array<CIMParamValue> inParams;
         Array<CIMParamValue> outParams;         Array<CIMParamValue> outParams;
  
         inParams.append(CIMParamValue(          inParams.append(CIMParamValue("force",
             CIMParameter("force", CIMType::BOOLEAN),  
             CIMValue(Boolean(forceOption))));             CIMValue(Boolean(forceOption))));
  
         inParams.append(CIMParamValue(          inParams.append(CIMParamValue("timeout",
             CIMParameter("timeout", CIMType::UINT32),  
             CIMValue(Uint32(timeoutValue))));             CIMValue(Uint32(timeoutValue))));
  
         CIMValue retValue = client.invokeMethod(         CIMValue retValue = client.invokeMethod(
Line 291 
Line 286 
             "$0 terminated on port $1.", PEGASUS_NAME, portNumberStr);             "$0 terminated on port $1.", PEGASUS_NAME, portNumberStr);
  
     }     }
       catch(CIMClientCIMException& e)
       {
           PEGASUS_STD(cerr) << "Failed to shutdown server: " << e.getMessage() << PEGASUS_STD(endl);
           exit(1);
       }
       catch(CIMClientException& e)
       {
           // this may mean the cimserver has been terminated
       }
     catch(Exception& e)     catch(Exception& e)
     {     {
         PEGASUS_STD(cerr) << "Failed to shutdown server: " << e.getMessage() << PEGASUS_STD(endl);         PEGASUS_STD(cerr) << "Failed to shutdown server: " << e.getMessage() << PEGASUS_STD(endl);
Line 669 
Line 673 
     // try loop to bind the address, and run the server     // try loop to bind the address, and run the server
     try     try
     {     {
 #ifndef PEGASUS_OS_ZOS  #if !defined(PEGASUS_OS_ZOS) && ! defined(PEGASUS_OS_HPUX)
         slp_client *discovery = new slp_client() ;;         slp_client *discovery = new slp_client() ;;
         String serviceURL;         String serviceURL;
         serviceURL.assign("service:cim.pegasus://");         serviceURL.assign("service:cim.pegasus://");
Line 684 
Line 688 
         Monitor monitor;         Monitor monitor;
         CIMServer server(&monitor, useSSL);         CIMServer server(&monitor, useSSL);
  
         // bind throws an exception of the bind fails          // bind throws an exception if the bind fails
   #ifdef PEGASUS_LOCAL_DOMAIN_SOCKET
           cout << "Binding to domain socket" << endl;
   #else
         cout << "Binding to " << address << endl;         cout << "Binding to " << address << endl;
   #endif
  
         char* end = 0;         char* end = 0;
         long portNumber = strtol(address, &end, 10);         long portNumber = strtol(address, &end, 10);
Line 702 
Line 710 
         //         //
         while( !server.terminated() )         while( !server.terminated() )
         {         {
 #ifndef PEGASUS_OS_ZOS  #if !defined(PEGASUS_OS_ZOS) && ! defined(PEGASUS_OS_HPUX)
           if(useSLP  )           if(useSLP  )
           {           {
             if(  (time(NULL) - last ) > 60 )             if(  (time(NULL) - last ) > 60 )


Legend:
Removed from v.1.39  
changed lines
  Added in v.1.44

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2