(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.66 and 1.72

version 1.66, 2002/08/23 16:11:21 version 1.72, 2002/09/13 21:40:43
Line 32 
Line 32 
 // Modified By: Jenny Yu (jenny_yu@hp.com) // Modified By: Jenny Yu (jenny_yu@hp.com)
 // //
 // Modified By: Sushma Fernandes (sushma_fernandes@hp.com) // Modified By: Sushma Fernandes (sushma_fernandes@hp.com)
   //              Carol Ann Krug Graves, Hewlett-Packard Company
   //                (carolann_graves@hp.com)
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 83 
Line 85 
  
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/Constants.h> #include <Pegasus/Common/Constants.h>
 #include <Pegasus/suballoc/suballoc.h>  
 #include <iostream> #include <iostream>
 #include <cassert> #include <cassert>
 #include <cstdlib> #include <cstdlib>
Line 248 
Line 249 
         //         //
         // set client timeout to 2 seconds         // set client timeout to 2 seconds
         //         //
         client.setTimeOut(2000);          client.setTimeout(2000);
     }     }
     catch(Exception& e)     catch(Exception& e)
     {     {
Line 269 
Line 270 
         //         //
         String referenceStr = "//";         String referenceStr = "//";
         referenceStr.append(hostStr);         referenceStr.append(hostStr);
         referenceStr.append(PEGASUS_NAMESPACENAME_SHUTDOWN);          referenceStr.append("/");
           referenceStr.append(PEGASUS_NAMESPACENAME_SHUTDOWN.getString());
         referenceStr.append(":");         referenceStr.append(":");
         referenceStr.append(PEGASUS_CLASSNAME_SHUTDOWN);          referenceStr.append(PEGASUS_CLASSNAME_SHUTDOWN.getString());
         CIMObjectPath reference(referenceStr);         CIMObjectPath reference(referenceStr);
  
         //         //
Line 470 
Line 472 
                     //                     //
                     // check to see if user is root                     // check to see if user is root
                     //                     //
   #ifndef PEGASUS_OS_OS400
                     if (!System::isPrivilegedUser(System::getEffectiveUserName()))                     if (!System::isPrivilegedUser(System::getEffectiveUserName()))
                     {                     {
                         cout << "You must have superuser privilege to run ";                         cout << "You must have superuser privilege to run ";
                         cout << "cimserver." << endl;                         cout << "cimserver." << endl;
                         exit(0);                         exit(0);
                     }                     }
   #endif
  
                     //                     //
                     // Check to see if shutdown has already been specified:                     // Check to see if shutdown has already been specified:
Line 595 
Line 599 
         {         {
             String configTimeout =             String configTimeout =
                 configManager->getCurrentValue("shutdownTimeout");                 configManager->getCurrentValue("shutdownTimeout");
             ArrayDestroyer<char> timeoutCString(configTimeout.allocateCString());              timeoutValue = strtol(configTimeout.getCString(), (char **)0, 10);
             timeoutValue = strtol(timeoutCString.getPointer(), (char **)0, 10);  
  
             shutdownCIMOM(timeoutValue);             shutdownCIMOM(timeoutValue);
  
Line 643 
Line 646 
  
     if (useSSL)     if (useSSL)
     {     {
         char* p = httpsPort.allocateCString();  
         char* end = 0;         char* end = 0;
         Uint32 port = strtol(p, &end, 10);          CString portString = httpsPort.getCString();
           Uint32 port = strtol(portString, &end, 10);
         assert(end != 0 && *end == '\0');         assert(end != 0 && *end == '\0');
         delete [] p;  
  
         //         //
         // Look up the WBEM-HTTPS port number         // Look up the WBEM-HTTPS port number
Line 657 
Line 659 
     }     }
     else     else
     {     {
         char* p = httpPort.allocateCString();  
         char* end = 0;         char* end = 0;
         Uint32 port = strtol(p, &end, 10);          CString portString = httpPort.getCString();
           Uint32 port = strtol(portString, &end, 10);
         assert(end != 0 && *end == '\0');         assert(end != 0 && *end == '\0');
         delete [] p;  
  
         //         //
         // Look up the WBEM-HTTP port number         // Look up the WBEM-HTTP port number
Line 710 
Line 711 
         String serviceURL;         String serviceURL;
         serviceURL.assign("service:cim.pegasus://");         serviceURL.assign("service:cim.pegasus://");
         String host_name = slp_get_host_name();         String host_name = slp_get_host_name();
         serviceURL += host_name;          serviceURL.append(host_name);
         serviceURL += ":";          serviceURL.append(":");
         serviceURL += address;          serviceURL.append(address);
         char *url = serviceURL.allocateCString();  
         //      free(host_name);  
 #endif #endif
  
         Monitor monitor(true);         Monitor monitor(true);
Line 776 
Line 775 
           {           {
             if(  (time(NULL) - last ) > 60 )             if(  (time(NULL) - last ) > 60 )
             {             {
               if( discovery != NULL && url != NULL )                if( discovery != NULL && serviceURL.size() )
                 discovery->srv_reg_all(url,                  discovery->srv_reg_all(serviceURL.getCString(),
                                        "(namespace=root/cimv2)",                                        "(namespace=root/cimv2)",
                                        "service:cim.pegasus",                                        "service:cim.pegasus",
                                        "DEFAULT",                                        "DEFAULT",


Legend:
Removed from v.1.66  
changed lines
  Added in v.1.72

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2