version 1.33, 2007/06/22 17:35:54
|
version 1.34, 2007/06/27 19:25:38
|
|
|
#include <Pegasus/Common/PegasusAssert.h> | #include <Pegasus/Common/PegasusAssert.h> |
#include <fstream> | #include <fstream> |
#include <Pegasus/Common/FileSystem.h> | #include <Pegasus/Common/FileSystem.h> |
#include <Pegasus/Common/Monitor.h> |
|
#include <Pegasus/Common/PegasusVersion.h> | #include <Pegasus/Common/PegasusVersion.h> |
#include <Pegasus/Common/Logger.h> | #include <Pegasus/Common/Logger.h> |
#include <Pegasus/Common/System.h> | #include <Pegasus/Common/System.h> |
|
|
PEGASUS_PROCESS_NAME, PEGASUS_CIMSERVER_START_FILE); | PEGASUS_PROCESS_NAME, PEGASUS_CIMSERVER_START_FILE); |
AutoPtr<CIMServerProcess> _cimServerProcess(new CIMServerProcess()); | AutoPtr<CIMServerProcess> _cimServerProcess(new CIMServerProcess()); |
static CIMServer* _cimServer = 0; | static CIMServer* _cimServer = 0; |
static Monitor* _monitor = 0; |
|
| |
// | // |
// The command name. | // The command name. |
|
|
static const char OPTION_BINDVERBOSE = 'X'; | static const char OPTION_BINDVERBOSE = 'X'; |
#endif | #endif |
| |
static const String PROPERTY_TIMEOUT = "shutdownTimeout"; |
|
|
|
ConfigManager* configManager; |
|
|
|
/** GetOptions function - This function defines the Options Table | /** GetOptions function - This function defines the Options Table |
and sets up the options from that table using the config manager. | and sets up the options from that table using the config manager. |
| |
|
|
//We need to delete the _cimServer reference on exit in order for the destructors to get called. | //We need to delete the _cimServer reference on exit in order for the destructors to get called. |
void deleteCIMServer() | void deleteCIMServer() |
{ | { |
if (_cimServer) |
|
{ |
|
delete _cimServer; | delete _cimServer; |
_cimServer = 0; | _cimServer = 0; |
} | } |
| |
if (_monitor) |
|
{ |
|
delete _monitor; |
|
} |
|
} |
|
|
|
// l10n | // l10n |
// | // |
// Dummy function for the Thread object associated with the initial thread. | // Dummy function for the Thread object associated with the initial thread. |
|
|
// | // |
// Get an instance of the Config Manager. | // Get an instance of the Config Manager. |
// | // |
configManager = ConfigManager::getInstance(); |
ConfigManager* configManager = ConfigManager::getInstance(); |
configManager->useConfigFiles = true; | configManager->useConfigFiles = true; |
| |
// | // |
|
|
// try loop to bind the address, and run the server | // try loop to bind the address, and run the server |
try | try |
{ | { |
_monitor = new Monitor(); |
_cimServer = new CIMServer(); |
_cimServer = new CIMServer(_monitor); |
|
| |
| |
if (enableHttpConnection) | if (enableHttpConnection) |