(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.154 and 1.161

version 1.154, 2005/03/10 23:24:48 version 1.161, 2005/05/05 20:24:31
Line 57 
Line 57 
 // //
 // Modified By: Heather Sterling, IBM (hsterl@us.ibm.com) - PEP#222 // Modified By: Heather Sterling, IBM (hsterl@us.ibm.com) - PEP#222
 // //
   // Modified By: Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) - Bug#3452
   //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
  
Line 127 
Line 129 
 #include <Pegasus/Server/CIMServer.h> #include <Pegasus/Server/CIMServer.h>
 #include <Service/ServerProcess.h> #include <Service/ServerProcess.h>
  
   #if defined(PEGASUS_OS_OS400)
   #  include "vfyptrs.cinc"
   #  include "OS400ConvertChar.h"
   #endif
   
 PEGASUS_USING_PEGASUS; PEGASUS_USING_PEGASUS;
 PEGASUS_USING_STD; PEGASUS_USING_STD;
  
Line 319 
Line 326 
     cout << MessageLoader::getMessage(parms) << endl;     cout << MessageLoader::getMessage(parms) << endl;
 } }
  
   //This needs to be called at various points in the code depending on the platform and error conditions.
   //We need to delete the _cimServer reference on exit in order for the destructors to get called.
   void deleteCIMServer()
   {
       if (_cimServer)
       {
           delete _cimServer;
           _cimServer = 0;
       }
   }
   
 // l10n // l10n
 // //
 // Dummy function for the Thread object associated with the initial thread. // Dummy function for the Thread object associated with the initial thread.
Line 476 
Line 494 
                                      "Forced shutdown initiated.");                                      "Forced shutdown initiated.");
             PEGASUS_STD(cerr) << MessageLoader::getMessage(parms) << PEGASUS_STD(endl);             PEGASUS_STD(cerr) << MessageLoader::getMessage(parms) << PEGASUS_STD(endl);
         }         }
            PEGASUS_STD(cerr) << "Exit! " << endl;
         exit(1);         exit(1);
 #endif #endif
     }     }
Line 857 
Line 876 
 #endif #endif
  
     // Make sure at least one connection is enabled     // Make sure at least one connection is enabled
 #ifndef PEGASUS_LOCAL_DOMAIN_SOCKET  #ifdef PEGASUS_DISABLE_LOCAL_DOMAIN_SOCKET
     if (!enableHttpConnection && !enableHttpsConnection)     if (!enableHttpConnection && !enableHttpsConnection)
     {     {
         //l10n         //l10n
Line 895 
Line 914 
         // We put String into Cstring because         // We put String into Cstring because
         // Directory functions only handle Cstring.         // Directory functions only handle Cstring.
         // ATTN-KS: create String based directory functions.         // ATTN-KS: create String based directory functions.
   #if !defined(PEGASUS_USE_SYSLOGS)
                   // When using syslog facility. No files anymore.
         logsDirectory = configManager->getCurrentValue("logdir");         logsDirectory = configManager->getCurrentValue("logdir");
         logsDirectory =         logsDirectory =
         ConfigManager::getHomedPath(configManager->getCurrentValue("logdir"));         ConfigManager::getHomedPath(configManager->getCurrentValue("logdir"));
   #endif
 #ifdef PEGASUS_OS_OS400 #ifdef PEGASUS_OS_OS400
     }  // end if (os400StartupOption == false)     }  // end if (os400StartupOption == false)
 #endif #endif
Line 908 
Line 929 
         // ATTN: Need tool to completely disable logging.         // ATTN: Need tool to completely disable logging.
  
 #if !defined(PEGASUS_OS_HPUX) && !defined(PEGASUS_PLATFORM_LINUX_IA64_GNU) && \ #if !defined(PEGASUS_OS_HPUX) && !defined(PEGASUS_PLATFORM_LINUX_IA64_GNU) && \
 !defined(PEGASUS_OS_OS400)  !defined(PEGASUS_OS_OS400) && !defined(PEGASUS_USE_SYSLOGS)
         Logger::setHomeDirectory(logsDirectory);         Logger::setHomeDirectory(logsDirectory);
 #endif #endif
  
Line 946 
Line 967 
         // Leave this in until people get familiar with the logs.         // Leave this in until people get familiar with the logs.
         //l10n         //l10n
         //cout << "Logs Directory = " << logsDirectory << endl;         //cout << "Logs Directory = " << logsDirectory << endl;
   #if !defined(PEGASUS_USE_SYSLOGS)
         MessageLoaderParms parms("src.Server.cimserver.LOGS_DIRECTORY",         MessageLoaderParms parms("src.Server.cimserver.LOGS_DIRECTORY",
                                  "Logs Directory = ");                                  "Logs Directory = ");
         cout << MessageLoader::getMessage(parms) << logsDirectory << endl;         cout << MessageLoader::getMessage(parms) << logsDirectory << endl;
 #endif #endif
   #endif
     }     }
     catch (UnrecognizedConfigProperty& e)     catch (UnrecognizedConfigProperty& e)
     {     {
Line 971 
Line 994 
 #endif #endif
     }     }
  
       // Bug 2148 - Here is the order of operations for determining the server HTTP and HTTPS ports.
       // 1) If the user explicitly specified a port, use it.
       // 2) If the user did not specify a port, get the port from the services file.
       // 3) If no value is specified in the services file, use the IANA WBEM default port.
       // Note that 2 and 3 are done within the System::lookupPort method
       // An empty string from the ConfigManager implies that the user did not specify a port.
   
     Uint32 portNumberHttps=0;     Uint32 portNumberHttps=0;
     Uint32 portNumberHttp=0;     Uint32 portNumberHttp=0;
     Uint32 portNumberExportHttps=0;     Uint32 portNumberExportHttps=0;
Line 978 
Line 1008 
     if (enableHttpsConnection)     if (enableHttpsConnection)
     {     {
         String httpsPort = configManager->getCurrentValue("httpsPort");         String httpsPort = configManager->getCurrentValue("httpsPort");
           if (httpsPort == String::EMPTY)
           {
               //
               // Look up the WBEM-HTTPS port number
               //
               portNumberHttps = System::lookupPort(WBEM_HTTPS_SERVICE_NAME, WBEM_DEFAULT_HTTPS_PORT);
   
           } else
           {
               //
               // user-specified
               //
         CString portString = httpsPort.getCString();         CString portString = httpsPort.getCString();
         char* end = 0;         char* end = 0;
         Uint32 port = strtol(portString, &end, 10);              portNumberHttps = strtol(portString, &end, 10);
         if(!(end != 0 && *end == '\0'))         if(!(end != 0 && *end == '\0'))
         {         {
             PEGASUS_STD(cerr) << "Bad HTTPS Port Value" << PEGASUS_STD(endl);                  InvalidPropertyValue e("httpsPort", httpsPort);
                   cerr << e.getMessage() << endl;
             exit(1);             exit(1);
         }         }
           }
   
         //  
         // Look up the WBEM-HTTPS port number  
         //  
         portNumberHttps = System::lookupPort(WBEM_HTTPS_SERVICE_NAME, port);  
     }     }
  
     if (enableHttpConnection)     if (enableHttpConnection)
     {     {
         String httpPort = configManager->getCurrentValue("httpPort");         String httpPort = configManager->getCurrentValue("httpPort");
           if (httpPort == String::EMPTY)
           {
               //
               // Look up the WBEM-HTTP port number
               //
               portNumberHttp = System::lookupPort(WBEM_HTTP_SERVICE_NAME, WBEM_DEFAULT_HTTP_PORT);
   
           } else
           {
               //
               // user-specified
               //
         CString portString = httpPort.getCString();         CString portString = httpPort.getCString();
         char* end = 0;         char* end = 0;
         Uint32 port = strtol(portString, &end, 10);              portNumberHttp = strtol(portString, &end, 10);
         if(!(end != 0 && *end == '\0'))         if(!(end != 0 && *end == '\0'))
         {         {
             PEGASUS_STD(cerr) << "Bad HTTP Port Value" << PEGASUS_STD(endl);                  InvalidPropertyValue e("httpPort", httpPort);
                   cerr << e.getMessage() << endl;
             exit(1);             exit(1);
         }         }
         //  
         // Look up the WBEM-HTTP port number  
         //  
         portNumberHttp = System::lookupPort(WBEM_HTTP_SERVICE_NAME, port);  
     }     }
       }
   
  
     if (enableSSLExportClientVerification)     if (enableSSLExportClientVerification)
     {     {
Line 1151 
Line 1200 
     try     try
     {     {
  
   
   
   
   
     Monitor monitor;     Monitor monitor;
     //PEP#222     //PEP#222
     //CIMServer server(&monitor);     //CIMServer server(&monitor);
Line 1192 
Line 1237 
                 "Listening on Export HTTPS port $0.", portNumberExportHttps);                 "Listening on Export HTTPS port $0.", portNumberExportHttps);
         }         }
  
 #ifdef PEGASUS_LOCAL_DOMAIN_SOCKET  #ifndef PEGASUS_DISABLE_LOCAL_DOMAIN_SOCKET
         _cimServer->addAcceptor(true, 0, false, false);         _cimServer->addAcceptor(true, 0, false, false);
         //l10n         //l10n
         //Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION,         //Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION,
Line 1227 
Line 1272 
             cout << MessageLoader::getMessage(parms) << endl;             cout << MessageLoader::getMessage(parms) << endl;
         }         }
  
 # ifdef PEGASUS_LOCAL_DOMAIN_SOCKET  # ifndef PEGASUS_DISABLE_LOCAL_DOMAIN_SOCKET
         //l10n         //l10n
         //cout << "Listening on local connection socket" << endl;         //cout << "Listening on local connection socket" << endl;
         MessageLoaderParms parms("src.Server.cimserver.LISTENING_ON_LOCAL",         MessageLoaderParms parms("src.Server.cimserver.LISTENING_ON_LOCAL",
Line 1288 
Line 1333 
       _cimServer->runForever();       _cimServer->runForever();
  
     }     }
     MessageQueueService::force_shutdown(true);  
         //         //
         // normal termination         // normal termination
     //     //
Line 1333 
Line 1378 
         if (daemonOption)         if (daemonOption)
                 _cimServerProcess->notify_parent(1);                 _cimServerProcess->notify_parent(1);
  
           deleteCIMServer();
         return 1;         return 1;
     }     }
  
       deleteCIMServer();
     return 0;     return 0;
 } }
  


Legend:
Removed from v.1.154  
changed lines
  Added in v.1.161

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2