version 1.238.2.2, 2013/04/06 04:38:19
|
version 1.239, 2011/10/13 05:25:40
|
|
|
| |
//Windows service variables are not defined elsewhere in the product | //Windows service variables are not defined elsewhere in the product |
//enable ability to override these | //enable ability to override these |
|
#ifndef PEGASUS_FLAVOR |
#ifndef PEGASUS_SERVICE_NAME | #ifndef PEGASUS_SERVICE_NAME |
#define PEGASUS_SERVICE_NAME "Pegasus CIM Object Manager"; | #define PEGASUS_SERVICE_NAME "Pegasus CIM Object Manager"; |
#endif | #endif |
#ifndef PEGASUS_SERVICE_DESCRIPTION | #ifndef PEGASUS_SERVICE_DESCRIPTION |
#define PEGASUS_SERVICE_DESCRIPTION "Pegasus CIM Object Manager Service"; | #define PEGASUS_SERVICE_DESCRIPTION "Pegasus CIM Object Manager Service"; |
#endif | #endif |
|
#else |
|
#ifndef PEGASUS_SERVICE_NAME |
|
#define PEGASUS_SERVICE_NAME PEGASUS_FLAVOR " Pegasus CIM Object Manager" |
|
#endif |
|
#ifndef PEGASUS_SERVICE_DESCRIPTION |
|
#define PEGASUS_SERVICE_DESCRIPTION PEGASUS_FLAVOR \ |
|
" Pegasus CIM Object Manager Service"; |
|
#endif |
|
#endif |
| |
#ifdef PEGASUS_OS_PASE | #ifdef PEGASUS_OS_PASE |
#include <as400_protos.h> //for _SETCCSID | #include <as400_protos.h> //for _SETCCSID |
|
|
// | // |
if (shutdownOption) | if (shutdownOption) |
{ | { |
#if defined(PEGASUS_OS_ZOS) && defined(PEGASUS_ZOS_SECURITY) |
|
// This checks whether user is authorized to stop the |
|
// CIM Server. When unauthorized a message is logged to |
|
// to the user and program exits. |
|
shutdownCheckProfileCIMSERVclassWBEM(); |
|
// Depending on the success of the previous check we may not |
|
// reach this code!!! |
|
#endif |
|
String configTimeout = | String configTimeout = |
configManager->getCurrentValue("shutdownTimeout"); | configManager->getCurrentValue("shutdownTimeout"); |
Uint32 timeoutValue = | Uint32 timeoutValue = |
|
|
{ | { |
Uint32 portNumberHttp = 0; | Uint32 portNumberHttp = 0; |
String httpPort = configManager->getCurrentValue("httpPort"); | String httpPort = configManager->getCurrentValue("httpPort"); |
if (httpPort.size() == 0) |
if (httpPort == String::EMPTY) |
{ | { |
// | // |
// Look up the WBEM-HTTP port number | // Look up the WBEM-HTTP port number |
|
|
} | } |
else | else |
{ | { |
Uint64 longNumber; |
// |
// use the current value which has been checked for validity at |
// user-specified |
// load(fct. GetOptions), see DefaultPropertyOwner::isValid() |
// |
StringConversion::decimalStringToUint64( |
CString portString = httpPort.getCString(); |
httpPort.getCString(), |
char* end = 0; |
longNumber); |
portNumberHttp = strtol(portString, &end, 10); |
portNumberHttp = longNumber & 0xffff; |
if (!(end != 0 && *end == '\0')) |
|
{ |
|
throw InvalidPropertyValue("httpPort", httpPort); |
|
} |
} | } |
| |
if (addIP6Acceptor) | if (addIP6Acceptor) |
|
|
{ | { |
Uint32 portNumberHttps = 0; | Uint32 portNumberHttps = 0; |
String httpsPort = configManager->getCurrentValue("httpsPort"); | String httpsPort = configManager->getCurrentValue("httpsPort"); |
if (httpsPort.size() == 0 ) |
if (httpsPort == String::EMPTY) |
{ | { |
// | // |
// Look up the WBEM-HTTPS port number | // Look up the WBEM-HTTPS port number |
|
|
} | } |
else | else |
{ | { |
Uint64 longNumber; |
// |
// use the current value which has been checked for validity at |
// user-specified |
// load(fct. GetOptions), see DefaultPropertyOwner::isValid() |
// |
StringConversion::decimalStringToUint64( |
CString portString = httpsPort.getCString(); |
httpsPort.getCString(), |
char* end = 0; |
longNumber); |
portNumberHttps = strtol(portString, &end, 10); |
portNumberHttps = longNumber & 0xffff; |
if (!(end != 0 && *end == '\0')) |
|
{ |
|
throw InvalidPropertyValue("httpsPort", httpsPort); |
|
} |
} | } |
if (addIP6Acceptor) | if (addIP6Acceptor) |
{ | { |