version 1.216, 2008/02/08 19:17:37
|
version 1.221, 2008/06/18 18:12:11
|
|
|
#include <Pegasus/Common/FileSystem.h> | #include <Pegasus/Common/FileSystem.h> |
#include <Pegasus/Common/PegasusVersion.h> | #include <Pegasus/Common/PegasusVersion.h> |
#include <Pegasus/Common/Logger.h> | #include <Pegasus/Common/Logger.h> |
|
#include <Pegasus/Common/StringConversion.h> |
#include <Pegasus/Common/System.h> | #include <Pegasus/Common/System.h> |
#include <Pegasus/Common/Tracer.h> | #include <Pegasus/Common/Tracer.h> |
#include <Pegasus/Common/LanguageParser.h> | #include <Pegasus/Common/LanguageParser.h> |
|
|
if ( setEBCDICEncoding(STDOUT_FILENO)==-1 || | if ( setEBCDICEncoding(STDOUT_FILENO)==-1 || |
setEBCDICEncoding(STDERR_FILENO)==-1 ) | setEBCDICEncoding(STDERR_FILENO)==-1 ) |
{ | { |
PEG_TRACE_CSTRING(TRC_SERVER,Tracer::LEVEL4, |
PEG_TRACE_CSTRING(TRC_SERVER,Tracer::LEVEL1, |
"Coud not set stdout or stderr to EBCDIC encoding."); | "Coud not set stdout or stderr to EBCDIC encoding."); |
} | } |
// Need to initialize timezone information in the | // Need to initialize timezone information in the |
|
|
"CIM Server's Job Name is: $0", fullJobName); | "CIM Server's Job Name is: $0", fullJobName); |
#endif | #endif |
| |
|
#ifdef PEGASUS_DISABLE_LOCAL_DOMAIN_SOCKET |
|
// Make sure at least one connection is enabled |
|
|
Boolean enableHttpConnection = ConfigManager::parseBooleanValue( | Boolean enableHttpConnection = ConfigManager::parseBooleanValue( |
configManager->getCurrentValue("enableHttpConnection")); | configManager->getCurrentValue("enableHttpConnection")); |
Boolean enableHttpsConnection = ConfigManager::parseBooleanValue( | Boolean enableHttpsConnection = ConfigManager::parseBooleanValue( |
configManager->getCurrentValue("enableHttpsConnection")); | configManager->getCurrentValue("enableHttpsConnection")); |
| |
// Make sure at least one connection is enabled |
|
#ifdef PEGASUS_DISABLE_LOCAL_DOMAIN_SOCKET |
|
if (!enableHttpConnection && !enableHttpsConnection) | if (!enableHttpConnection && !enableHttpsConnection) |
{ | { |
//l10n |
Logger::put_l( |
//Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING, |
Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING, |
//"Neither HTTP nor HTTPS connection is enabled. " |
|
//"CIMServer will not be started."); |
|
Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING, |
|
"src.Server.cimserver.HTTP_NOT_ENABLED_SERVER_NOT_STARTING", | "src.Server.cimserver.HTTP_NOT_ENABLED_SERVER_NOT_STARTING", |
"Neither HTTP nor HTTPS connection is enabled." | "Neither HTTP nor HTTPS connection is enabled." |
" CIMServer will not be started."); | " CIMServer will not be started."); |
//cerr << "Neither HTTP nor HTTPS connection is enabled. " |
|
//"CIMServer will not be started." << endl; |
|
MessageLoaderParms parms( | MessageLoaderParms parms( |
"src.Server.cimserver.HTTP_NOT_ENABLED_SERVER_NOT_STARTING", | "src.Server.cimserver.HTTP_NOT_ENABLED_SERVER_NOT_STARTING", |
"Neither HTTP nor HTTPS connection is enabled." | "Neither HTTP nor HTTPS connection is enabled." |
" CIMServer will not be started."); | " CIMServer will not be started."); |
cerr << MessageLoader::getMessage(parms) << endl; | cerr << MessageLoader::getMessage(parms) << endl; |
return(1); |
return 1; |
} | } |
#endif | #endif |
|
|
// | // |
// Check to see if we should start Pegasus as a daemon | // Check to see if we should start Pegasus as a daemon |
// | // |
|
|
portNumberHttp, false); | portNumberHttp, false); |
} | } |
| |
|
char scratchBuffer[22]; |
|
Uint32 n; |
|
const char * portNumberHttpStr = Uint32ToString( |
|
scratchBuffer, portNumberHttp, n); |
MessageLoaderParms parms( | MessageLoaderParms parms( |
"src.Server.cimserver.LISTENING_ON_HTTP_PORT", | "src.Server.cimserver.LISTENING_ON_HTTP_PORT", |
"Listening on HTTP port $0.", portNumberHttp); |
"Listening on HTTP port $0.", portNumberHttpStr); |
Logger::put( | Logger::put( |
Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION, | Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION, |
MessageLoader::getMessage(parms)); | MessageLoader::getMessage(parms)); |
|
|
_cimServer->addAcceptor(HTTPAcceptor::IPV4_CONNECTION, | _cimServer->addAcceptor(HTTPAcceptor::IPV4_CONNECTION, |
portNumberHttps, true); | portNumberHttps, true); |
} | } |
|
char scratchBuffer[22]; |
|
Uint32 n; |
|
const char * portNumberHttpsStr = Uint32ToString( |
|
scratchBuffer, portNumberHttps, n); |
MessageLoaderParms parms( | MessageLoaderParms parms( |
"src.Server.cimserver.LISTENING_ON_HTTPS_PORT", | "src.Server.cimserver.LISTENING_ON_HTTPS_PORT", |
"Listening on HTTPS port $0.", portNumberHttps); |
"Listening on HTTPS port $0.", portNumberHttpsStr); |
Logger::put( | Logger::put( |
Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION, | Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION, |
MessageLoader::getMessage(parms)); | MessageLoader::getMessage(parms)); |
|
|
| |
#endif | #endif |
| |
|
#ifdef PEGASUS_ENABLE_SLP |
|
_cimServer->startSLPProvider(); |
|
#endif |
// | // |
// Loop to call CIMServer's runForever() method until CIMServer | // Loop to call CIMServer's runForever() method until CIMServer |
// has been shutdown | // has been shutdown |