From 9e4e3351e40d38113504c2794e6db551ea23674d Mon Sep 17 00:00:00 2001 From: jvdias Date: Wed, 31 May 2006 19:06:15 +0000 Subject: [PATCH] apply upstream 2.5.2_APPROVED bug fixes; fix bug 193121 --- pegasus-2.5.1-obz5046.patch | 36 + pegasus-2.5.1-obz5047.patch | 21 + pegasus-2.5.1-obz5048.patch | 25 + pegasus-2.5.1-obz5049.patch | 32 + pegasus-2.5.1-obz5051.patch | 1664 +++++++++++++++++++++++++++++++++++ pegasus-2.5.1-obz5053.patch | 240 +++++ pegasus-2.5.1-obz5059.patch | 11 + pegasus-2.5.1-obz5072.patch | 58 ++ pegasus-2.5.1-obz5083.patch | 751 ++++++++++++++++ tog-pegasus.spec | 2 +- 10 files changed, 2839 insertions(+), 1 deletion(-) create mode 100644 pegasus-2.5.1-obz5046.patch create mode 100644 pegasus-2.5.1-obz5047.patch create mode 100644 pegasus-2.5.1-obz5048.patch create mode 100644 pegasus-2.5.1-obz5049.patch create mode 100644 pegasus-2.5.1-obz5051.patch create mode 100644 pegasus-2.5.1-obz5053.patch create mode 100644 pegasus-2.5.1-obz5059.patch create mode 100644 pegasus-2.5.1-obz5072.patch create mode 100644 pegasus-2.5.1-obz5083.patch diff --git a/pegasus-2.5.1-obz5046.patch b/pegasus-2.5.1-obz5046.patch new file mode 100644 index 0000000..213a2df --- /dev/null +++ b/pegasus-2.5.1-obz5046.patch @@ -0,0 +1,36 @@ +--- pegasus/rpm/manLinux/man1.Z/cimprovider.1.obz5046 2004-12-08 04:40:38.000000000 -0500 ++++ pegasus/rpm/manLinux/man1.Z/cimprovider.1 2006-05-31 13:43:51.000000000 -0400 +@@ -146,11 +146,13 @@ + Error + .PD + .RE +-.SH "USAGE NOTE" ++.SH "USAGE NOTES" + .PP + The + .B cimprovider + command requires that the CIM Server is running. ++If an operation requires more than two minutes to complete, the cimprovider ++command prints a timeout message and returns an error value. + .SH "EXAMPLES " + .PP + Disable provider module "OperatingSystemProvider" and +--- pegasus/src/Clients/cimprovider/CIMProviderCommand.cpp.obz5046 2006-01-30 11:16:33.000000000 -0500 ++++ pegasus/src/Clients/cimprovider/CIMProviderCommand.cpp 2006-05-31 14:02:17.000000000 -0400 +@@ -69,6 +69,8 @@ + #include "OS400ConvertChar.h" + #endif + ++#define CIMPROVIDERCOMMAND_CLIENT_DEFAULTTIMEOUT 120000 ++ + PEGASUS_USING_STD; + + PEGASUS_NAMESPACE_BEGIN +@@ -1145,6 +1147,7 @@ + // Construct the CIMClient and set to request server messages + // in the default language of this client process. + _client.reset(new CIMClient);//PEP101 ++ _client->setTimeout(CIMPROVIDERCOMMAND_CLIENT_DEFAULTTIMEOUT); + _client->setRequestDefaultLanguages(); //l10n + } + catch (Exception & e) diff --git a/pegasus-2.5.1-obz5047.patch b/pegasus-2.5.1-obz5047.patch new file mode 100644 index 0000000..4549098 --- /dev/null +++ b/pegasus-2.5.1-obz5047.patch @@ -0,0 +1,21 @@ +--- pegasus/src/Pegasus/Compiler/cimmofClient.h.obz5047 2006-01-30 11:17:33.000000000 -0500 ++++ pegasus/src/Pegasus/Compiler/cimmofClient.h 2006-05-31 12:09:17.000000000 -0400 +@@ -67,6 +67,8 @@ + #include + #include + ++#define CIMMOFCLIENT_TIMEOUT_DEFAULT 120000 ++ + PEGASUS_NAMESPACE_BEGIN + + // Forward declarations; +--- pegasus/src/Pegasus/Compiler/cimmofClient.cpp.obz5047 2006-01-30 11:17:33.000000000 -0500 ++++ pegasus/src/Pegasus/Compiler/cimmofClient.cpp 2006-05-31 12:10:02.000000000 -0400 +@@ -68,6 +68,7 @@ + // our caller handle it. + + _client = new CIMClient(); ++ _client->setTimeout(CIMMOFCLIENT_TIMEOUT_DEFAULT); + _client->setRequestDefaultLanguages(); //l10n + + #if defined(PEGASUS_OS_HPUX) || defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || defined(PEGASUS_OS_VMS) diff --git a/pegasus-2.5.1-obz5048.patch b/pegasus-2.5.1-obz5048.patch new file mode 100644 index 0000000..9e39a2c --- /dev/null +++ b/pegasus-2.5.1-obz5048.patch @@ -0,0 +1,25 @@ +--- pegasus/src/Pegasus/Client/CIMOperationRequestEncoder.cpp.obz5048 2006-01-30 11:16:42.000000000 -0500 ++++ pegasus/src/Pegasus/Client/CIMOperationRequestEncoder.cpp 2006-05-31 12:14:31.000000000 -0400 +@@ -67,6 +67,7 @@ + _authenticator(authenticator), + _showOutput(showOutput) + { ++ dataStore_prt = NULL; + } + + CIMOperationRequestEncoder::~CIMOperationRequestEncoder() +@@ -881,9 +882,11 @@ + Uint32 contentLength; + + http_request->parse(startLine, headers, contentLength); +- dataStore_prt->setRequestSize(contentLength); +- dataStore_prt->setStartNetworkTime(); +- ++ if ( dataStore_prt ) ++ { ++ dataStore_prt->setRequestSize(contentLength); ++ dataStore_prt->setStartNetworkTime(); ++ } + _outputQueue->enqueue(http_request); + } + diff --git a/pegasus-2.5.1-obz5049.patch b/pegasus-2.5.1-obz5049.patch new file mode 100644 index 0000000..4f868a2 --- /dev/null +++ b/pegasus-2.5.1-obz5049.patch @@ -0,0 +1,32 @@ +--- pegasus/src/Pegasus/Common/CIMStatusCode.h.obz5049 2006-02-17 14:30:37.000000000 -0500 ++++ pegasus/src/Pegasus/Common/CIMStatusCode.h 2006-05-31 11:43:33.000000000 -0400 +@@ -37,7 +37,6 @@ + #include + #include + #include +-#include + + PEGASUS_NAMESPACE_BEGIN + +--- pegasus/src/Pegasus/Common/Exception.h.obz5049 2006-01-30 11:17:03.000000000 -0500 ++++ pegasus/src/Pegasus/Common/Exception.h 2006-05-31 11:44:46.000000000 -0400 +@@ -37,7 +37,9 @@ + #include + #include + #include ++#ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES + #include ++#endif + #include + #include + +--- pegasus/src/Pegasus/Common/CIMStatusCode.cpp.obz5049 2006-01-30 11:16:47.000000000 -0500 ++++ pegasus/src/Pegasus/Common/CIMStatusCode.cpp 2006-05-31 11:43:52.000000000 -0400 +@@ -38,6 +38,7 @@ + //%///////////////////////////////////////////////////////////////////////////// + + #include "CIMStatusCode.h" ++#include + + PEGASUS_NAMESPACE_BEGIN + diff --git a/pegasus-2.5.1-obz5051.patch b/pegasus-2.5.1-obz5051.patch new file mode 100644 index 0000000..38f75d8 --- /dev/null +++ b/pegasus-2.5.1-obz5051.patch @@ -0,0 +1,1664 @@ +--- pegasus/TestMakefile.obz5051 2006-02-17 18:46:50.000000000 -0500 ++++ pegasus/TestMakefile 2006-05-31 12:18:40.000000000 -0400 +@@ -257,6 +257,8 @@ + $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestBinRepository + $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_OOP_TS1 + $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_IndInit_TS1 ++ $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_OOPProvFail_TS1 ++ $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_OOPProvFail_TS2 + $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_INDSSL_TS1 + $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_SSL_TS1 + $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_G11N_TS1 +@@ -360,6 +362,61 @@ + TESTSUITE_CMDS="$(IndInit_TS1b_TEST_CMDS)" + + ############################################################################### ++## OOPProvFail Test Suite 1: OOP Provider Module Failure Tests ++## ++## Configuration Options: forceProviderProcesses=true ++## enableAuthentication=true, enableAuthentication=false ++## ++## NOTE: Regardless of the setting of PEGASUS_DEFAULT_ENABLE_OOP, this test ++## suite is always run with OOP enabled. This test suite causes a provider to ++## exit. Running this test suite with OOP disabled would cause the cimserver ++## to exit and the test suite to fail. ++## ++## NOTE: The test is run once with authentication enabled, and once without ++## authentication enabled. ++## ++############################################################################### ++OOPProvFail_TS1a_CONFIG_OPTIONS = forceProviderProcesses=true enableAuthentication=true ++OOPProvFail_TS1b_CONFIG_OPTIONS = forceProviderProcesses=true enableAuthentication=false ++OOPProvFail_TS1_TEST_CMDS = \ ++ $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/OOPModuleFailureProvider/testclient@@OOPProvFail_TS1 ++ ++run_OOPProvFail_TS1: ++ $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \ ++ CIMSERVER_CONFIG_OPTIONS="$(OOPProvFail_TS1a_CONFIG_OPTIONS)" \ ++ TESTSUITE_CMDS="$(OOPProvFail_TS1_TEST_CMDS)" ++ $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \ ++ CIMSERVER_CONFIG_OPTIONS="$(OOPProvFail_TS1b_CONFIG_OPTIONS)" \ ++ TESTSUITE_CMDS="$(OOPProvFail_TS1_TEST_CMDS)" ++ ++############################################################################### ++## OOPProvFail Test Suite 2: OOP Provider Module Failure on IndicationService ++## Initialization Tests ++## ++## Configuration Options: forceProviderProcesses=true ++## enableAuthentication=true ++## ++## NOTE: Regardless of the setting of PEGASUS_DEFAULT_ENABLE_OOP, this test ++## suite is always run with OOP enabled. This test suite causes a provider to ++## exit. Running this test suite with OOP disabled would cause the cimserver ++## to exit and the test suite to fail. ++## ++############################################################################### ++OOPProvFail_TS2_CONFIG_OPTIONS = forceProviderProcesses=true enableAuthentication=true ++OOPProvFail_TS2a_TEST_CMDS = \ ++ $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/OOPModuleFailureProvider/testclient@@OOPProvFail_TS2a ++OOPProvFail_TS2b_TEST_CMDS = \ ++ $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/OOPModuleFailureProvider/testclient@@OOPProvFail_TS2b ++ ++run_OOPProvFail_TS2: ++ $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \ ++ CIMSERVER_CONFIG_OPTIONS="$(OOPProvFail_TS2_CONFIG_OPTIONS)" \ ++ TESTSUITE_CMDS="$(OOPProvFail_TS2a_TEST_CMDS)" ++ $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \ ++ CIMSERVER_CONFIG_OPTIONS="$(OOPProvFail_TS2_CONFIG_OPTIONS)" \ ++ TESTSUITE_CMDS="$(OOPProvFail_TS2b_TEST_CMDS)" ++ ++############################################################################### + ## Indication SSL Test Suite 1: Indication Testing over HTTPS + ## + ## Configuration Options: (none) +--- pegasus/src/Pegasus/ProviderManager2/OOPProviderManagerRouter.cpp.obz5051 2006-05-31 11:42:03.000000000 -0400 ++++ pegasus/src/Pegasus/ProviderManager2/OOPProviderManagerRouter.cpp 2006-05-31 12:18:40.000000000 -0400 +@@ -135,8 +135,10 @@ + ~ProviderAgentContainer(); + + Boolean isInitialized(); ++ Uint16 userContext, + + String getModuleName() const; ++ PEGASUS_PROVIDERMODULEFAIL_CALLBACK_T providerModuleFailCallback, + + CIMResponseMessage* processMessage(CIMRequestMessage* request); + void unloadIdleProviders(); +@@ -232,6 +234,12 @@ + + /** + Callback function to which response chunks are sent for processing. ++ User Context setting of the provider module served by this Provider ++ Agent. ++ */ ++ Uint16 _userContext; ++ ++ /** + */ + PEGASUS_RESPONSE_CHUNK_CALLBACK_T _responseChunkCallback; + +@@ -243,6 +251,12 @@ + /** + Pipe connection used to read responses from the Provider Agent. + */ ++ Callback function to be called upon detection of failure of a ++ provider module. ++ */ ++ PEGASUS_PROVIDERMODULEFAIL_CALLBACK_T _providerModuleFailCallback; ++ ++ /** + AutoPtr _pipeFromAgent; + /** + Pipe connection used to write requests to the Provider Agent. +@@ -332,13 +346,17 @@ + _userName(userName), + _indicationCallback(indicationCallback), + _responseChunkCallback(responseChunkCallback), ++ Uint16 userContext, + _isInitialized(false), + _subscriptionInitComplete(subscriptionInitComplete) ++ PEGASUS_PROVIDERMODULEFAIL_CALLBACK_T providerModuleFailCallback, + { + PEG_METHOD_ENTER(TRC_PROVIDERMANAGER, + "ProviderAgentContainer::ProviderAgentContainer"); ++ _userContext(userContext), + PEG_METHOD_EXIT(); + } ++ _providerModuleFailCallback(providerModuleFailCallback), + + ProviderAgentContainer::~ProviderAgentContainer() + { +@@ -520,7 +538,7 @@ + } + #elif defined (PEGASUS_OS_OS400) + +- //Out of provider support for OS400 goes here when needed. ++ //Out of process provider support for OS400 goes here when needed. + + #else + +@@ -903,24 +921,6 @@ + // connection + // + { +- // +- // If not a clean shutdown, log a warning message in case module +- // included indication providers +- // +- if (!cleanShutdown) +- { +- Logger::put_l( +- Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING, +- "ProviderManager.OOPProviderManagerRouter." +- "OOP_PROVIDER_MODULE_FAILURE_DETECTED", +- "A failure was detected in provider module $0. The" +- " generation of indications by providers in this module" +- " may be affected. To ensure these providers are" +- " serving active subscriptions, disable and then" +- " re-enable this module using the cimprovider command.", +- _moduleName); +- } +- + AutoMutex tableLock(_outstandingRequestTableMutex); + + CIMResponseMessage* response = +@@ -945,6 +945,21 @@ + // We're uninitializing, so do not propagate the exception + PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2, + "Ignoring _uninitialize() exception."); ++ ++ // ++ // If not a clean shutdown, call the provider module failure ++ // callback ++ // ++ if (!cleanShutdown) ++ { ++ // ++ // Call the provider module failure callback to ++ // communicate the failure to the Provider Manager Service ++ // Provider Manager Service will inform Indication Service ++ // ++ _providerModuleFailCallback (_moduleName, _userName, ++ _userContext); ++ } + } + + PEG_METHOD_EXIT(); +@@ -1389,13 +1404,15 @@ + + OOPProviderManagerRouter::OOPProviderManagerRouter( + PEGASUS_INDICATION_CALLBACK_T indicationCallback, +- PEGASUS_RESPONSE_CHUNK_CALLBACK_T responseChunkCallback) ++ PEGASUS_RESPONSE_CHUNK_CALLBACK_T responseChunkCallback, ++ PEGASUS_PROVIDERMODULEFAIL_CALLBACK_T providerModuleFailCallback) + { + PEG_METHOD_ENTER(TRC_PROVIDERMANAGER, + "OOPProviderManagerRouter::OOPProviderManagerRouter"); + + _indicationCallback = indicationCallback; + _responseChunkCallback = responseChunkCallback; ++ _providerModuleFailCallback = providerModuleFailCallback; + _subscriptionInitComplete = false; + + PEG_METHOD_EXIT(); +@@ -1653,6 +1670,30 @@ + } + else + { ++ // ++ // Look up the Provider Agent for this module instance and requesting ++ // user ++ // ++ ProviderAgentContainer* pa = _lookupProviderAgent(providerModule, ++ request); ++ PEGASUS_ASSERT(pa != 0); ++ ++ // ++ // Forward the request to the provider agent ++ // ++ response.reset(pa->processMessage(request)); ++ } ++ ++ response->syncAttributes(request); ++ ++ PEG_METHOD_EXIT(); ++ return response.release(); ++} ++ ++ProviderAgentContainer* OOPProviderManagerRouter::_lookupProviderAgent( ++ const CIMInstance& providerModule, ++ CIMRequestMessage* request) ++{ + // Retrieve the provider module name + String moduleName; + CIMValue nameValue = providerModule.getProperty( +@@ -1675,7 +1716,7 @@ + + if (userContext == 0) + { +- userContext = PG_PROVMODULE_USERCTXT_PRIVILEGED; ++ userContext = PEGASUS_DEFAULT_PROV_USERCTXT; + } + + String userName; +@@ -1703,7 +1744,7 @@ + } + else if (userContext == PG_PROVMODULE_USERCTXT_DESIGNATED) + { +- // Retrieve the provider module name ++ // Retrieve the provider module designated user property value + providerModule.getProperty(providerModule.findProperty( + PEGASUS_PROPERTYNAME_MODULE_DESIGNATEDUSER)).getValue(). + get(userName); +@@ -1725,26 +1766,6 @@ + PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, + "User name = " + userName); + +- // Look up the Provider Agent for this module and user +- ProviderAgentContainer* pa = _lookupProviderAgent(moduleName, userName); +- PEGASUS_ASSERT(pa != 0); +- +- // +- // Forward the request to the provider agent +- // +- response.reset(pa->processMessage(request)); +- } +- +- response->syncAttributes(request); +- +- PEG_METHOD_EXIT(); +- return response.release(); +-} +- +-ProviderAgentContainer* OOPProviderManagerRouter::_lookupProviderAgent( +- const String& moduleName, +- const String& userName) +-{ + ProviderAgentContainer* pa = 0; + String key = moduleName + ":" + userName; + +@@ -1752,7 +1773,9 @@ + if (!_providerAgentTable.lookup(key, pa)) + { + pa = new ProviderAgentContainer( +- moduleName, userName, _indicationCallback, _responseChunkCallback, ++ moduleName, userName, userContext, ++ _indicationCallback, _responseChunkCallback, ++ _providerModuleFailCallback, + _subscriptionInitComplete); + _providerAgentTable.insert(key, pa); + } +--- pegasus/src/Pegasus/ProviderManager2/ProviderManagerService.h.obz5051 2006-02-28 14:53:30.000000000 -0500 ++++ pegasus/src/Pegasus/ProviderManager2/ProviderManagerService.h 2006-05-31 12:18:40.000000000 -0400 +@@ -79,6 +79,13 @@ + static void responseChunkCallback( + CIMRequestMessage* request, CIMResponseMessage* response); + ++ /** ++ Callback function to be called upon detection of failure of a ++ provider module. ++ */ ++ static void providerModuleFailureCallback (const String & moduleName, ++ const String & userName, Uint16); ++ + private: + ProviderManagerService(); + +@@ -100,8 +107,8 @@ + + void _updateProviderModuleStatus( + CIMInstance& providerModule, +- Uint16 fromStatus, +- Uint16 toStatus); ++ const Array& removeStatus, ++ const Array& appendStatus); + + static ProviderManagerService* providerManagerService; + +--- pegasus/src/Pegasus/ProviderManager2/ProviderManagerService.cpp.obz5051 2006-05-31 11:42:03.000000000 -0400 ++++ pegasus/src/Pegasus/ProviderManager2/ProviderManagerService.cpp 2006-05-31 12:26:38.000000000 -0400 +@@ -55,7 +55,6 @@ + #include + #include + #include +-#include + + #include + +@@ -117,7 +116,8 @@ + if (forceProviderProcesses) + { + _oopProviderManagerRouter = new OOPProviderManagerRouter( +- indicationCallback, responseChunkCallback); ++ indicationCallback, responseChunkCallback, ++ providerModuleFailureCallback); + } + else + { +@@ -126,7 +126,8 @@ + } + #else + _oopProviderManagerRouter = new OOPProviderManagerRouter( +- indicationCallback, responseChunkCallback); ++ indicationCallback, responseChunkCallback, ++ providerModuleFailureCallback); + + if (!forceProviderProcesses) + { +@@ -453,9 +454,16 @@ + dynamic_cast(response); + if (emResp->cimException.getCode() == CIM_ERR_SUCCESS) + { +- _updateProviderModuleStatus( +- providerModule, CIM_MSE_OPSTATUS_VALUE_STOPPED, +- CIM_MSE_OPSTATUS_VALUE_OK); ++ // ++ // On a successful enable, remove Stopped status and ++ // append OK status ++ // ++ Array removeStatus; ++ Array appendStatus; ++ removeStatus.append (CIM_MSE_OPSTATUS_VALUE_STOPPED); ++ appendStatus.append (CIM_MSE_OPSTATUS_VALUE_OK); ++ _updateProviderModuleStatus ++ ( providerModule, removeStatus, appendStatus ); + } + } + catch (Exception& e) +@@ -490,12 +498,17 @@ + + try + { +- // Change module status from OK to STOPPING ++ // ++ // On issuing a disable request, append Stopping status ++ // Do not remove existing status ++ // + if (updateModuleStatus) + { +- _updateProviderModuleStatus( +- providerModule, CIM_MSE_OPSTATUS_VALUE_OK, +- CIM_MSE_OPSTATUS_VALUE_STOPPING); ++ Array removeStatus; ++ Array appendStatus; ++ appendStatus.append (CIM_MSE_OPSTATUS_VALUE_STOPPING); ++ _updateProviderModuleStatus ++ ( providerModule, removeStatus, appendStatus ); + } + + // Forward the request to the ProviderManager +@@ -508,21 +521,44 @@ + dynamic_cast(response); + if (dmResp->cimException.getCode() != CIM_ERR_SUCCESS) + { +- // Disable operation failed. Module not stopped. +- _updateProviderModuleStatus( +- providerModule, CIM_MSE_OPSTATUS_VALUE_STOPPING, +- CIM_MSE_OPSTATUS_VALUE_OK); ++ // ++ // On an unsuccessful disable, remove Stopping status ++ // ++ Array removeStatus; ++ Array appendStatus; ++ removeStatus.append (CIM_MSE_OPSTATUS_VALUE_STOPPING); ++ _updateProviderModuleStatus ++ ( providerModule, removeStatus, appendStatus ); + } + else + { + // Disable may or may not have been successful, + // depending on whether there are outstanding requests. +- // Use last operationalStatus entry. +- _updateProviderModuleStatus( +- providerModule, CIM_MSE_OPSTATUS_VALUE_STOPPING, +- dmResp->operationalStatus[ ++ // Remove Stopping status ++ // Append status, if any, from disable module response ++ Array removeStatus; ++ Array appendStatus; ++ removeStatus.append (CIM_MSE_OPSTATUS_VALUE_STOPPING); ++ if (dmResp->operationalStatus.size() > 0) ++ { ++ // ++ // On a successful disable, remove an OK or a Degraded ++ // status, if present ++ // ++ if (dmResp->operationalStatus[ ++ dmResp->operationalStatus.size()-1] == ++ CIM_MSE_OPSTATUS_VALUE_STOPPED) ++ { ++ removeStatus.append (CIM_MSE_OPSTATUS_VALUE_OK); ++ removeStatus.append ++ (CIM_MSE_OPSTATUS_VALUE_DEGRADED); ++ } ++ appendStatus.append (dmResp->operationalStatus[ + dmResp->operationalStatus.size()-1]); + } ++ _updateProviderModuleStatus( ++ providerModule, removeStatus, appendStatus); ++ } + } + } + catch (Exception& e) +@@ -666,7 +702,7 @@ + providerModule = pidc.getModule(); + } + +- Uint16 userContext = 0; ++ Uint16 userContext = PEGASUS_DEFAULT_PROV_USERCTXT; + Uint32 pos = providerModule.findProperty( + PEGASUS_PROPERTYNAME_MODULE_USERCONTEXT); + if (pos != PEG_NOT_FOUND) +@@ -787,10 +823,16 @@ + } + + // Updates the providerModule instance and the ProviderRegistrationManager ++// ++// This method is used to update the provider module status when the module is ++// disabled or enabled. If a Degraded status has been set (appended) to the ++// OperationalStatus, it is cleared (removed) when the module is disabled or ++// enabled. ++// + void ProviderManagerService::_updateProviderModuleStatus( + CIMInstance& providerModule, +- Uint16 fromStatus, +- Uint16 toStatus) ++ const Array& removeStatus, ++ const Array& appendStatus) + { + PEG_METHOD_ENTER(TRC_PROVIDERMANAGER, + "ProviderManagerService::_updateProviderModuleStatus"); +@@ -808,28 +850,10 @@ + pos = providerModule.findProperty(CIMName("OperationalStatus")); + PEGASUS_ASSERT(pos != PEG_NOT_FOUND); + CIMProperty operationalStatusProperty = providerModule.getProperty(pos); +- CIMValue operationalStatusValue = operationalStatusProperty.getValue(); +- +- if (!operationalStatusValue.isNull()) +- { +- operationalStatusValue.get(operationalStatus); +- } + +- // +- // update module status +- // +- for (Uint32 i = operationalStatus.size(); i > 0; i--) +- { +- if (operationalStatus[i-1] == fromStatus) +- { +- operationalStatus.remove(i-1); +- } +- } +- +- operationalStatus.append(toStatus); +- +- if (_providerRegistrationManager->setProviderModuleStatus( +- providerModuleName, operationalStatus) == false) ++ if (_providerRegistrationManager->updateProviderModuleStatus( ++ providerModuleName, removeStatus, appendStatus, operationalStatus) == ++ false) + { + throw PEGASUS_CIM_EXCEPTION_L( + CIM_ERR_FAILED, +@@ -947,4 +971,140 @@ + + } + ++void ProviderManagerService::providerModuleFailureCallback ++ (const String & moduleName, ++ const String & userName, ++ Uint16 userContext) ++{ ++ PEG_METHOD_ENTER (TRC_PROVIDERMANAGER, ++ "ProviderManagerService::providerModuleFailureCallback"); ++ ++ if (userContext == PG_PROVMODULE_USERCTXT_REQUESTOR) ++ { ++ Logger::put_l ( ++ Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING, ++ "ProviderManager.OOPProviderManagerRouter." ++ "OOP_PROVIDER_MODULE_USER_CTXT_FAILURE_DETECTED", ++ "A failure was detected in provider module $0 with" ++ " user context $1.", ++ moduleName, userName); ++ } ++ else // not requestor context ++ { ++ Logger::put_l ( ++ Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING, ++ "ProviderManager.OOPProviderManagerRouter." ++ "OOP_PROVIDER_MODULE_FAILURE_DETECTED", ++ "A failure was detected in provider module $0.", ++ moduleName); ++ } ++ ++ // ++ // Create Notify Provider Fail request message ++ // ++ CIMNotifyProviderFailRequestMessage * request = ++ new CIMNotifyProviderFailRequestMessage ++ (XmlWriter::getNextMessageId (), ++ moduleName, ++ userName, ++ QueueIdStack ()); ++ ++ // ++ // Send Notify Provider Fail request message to Indication Service ++ // ++ if (_indicationServiceQueueId == PEG_NOT_FOUND) ++ { ++ Array serviceIds; ++ ++ providerManagerService->find_services ++ (PEGASUS_QUEUENAME_INDICATIONSERVICE, 0, 0, &serviceIds); ++ PEGASUS_ASSERT (serviceIds.size () != 0); ++ ++ _indicationServiceQueueId = serviceIds [0]; ++ } ++ ++ request->queueIds = QueueIdStack ++ (_indicationServiceQueueId, providerManagerService->getQueueId ()); ++ ++ AsyncLegacyOperationStart * asyncRequest = new AsyncLegacyOperationStart ++ (providerManagerService->get_next_xid (), ++ 0, ++ _indicationServiceQueueId, ++ request, ++ _indicationServiceQueueId); ++ ++ AutoPtr asyncReply ++ (providerManagerService->SendWait (asyncRequest)); ++ ++ AutoPtr response ++ (reinterpret_cast ++ ((dynamic_cast ++ (asyncReply.get ()))->get_result ())); ++ ++ if (response->cimException.getCode () != CIM_ERR_SUCCESS) ++ { ++ PEG_TRACE_STRING (TRC_DISCARDED_DATA, Tracer::LEVEL2, ++ "Unexpected exception in providerModuleFailureCallback: " + ++ response->cimException.getMessage ()); ++ } ++ else ++ { ++ // ++ // Successful response ++ // Examine result to see if any subscriptions were affected ++ // ++ if (response->numSubscriptionsAffected > 0) ++ { ++ // ++ // Subscriptions were affected ++ // Update the provider module status to Degraded ++ // ++ try ++ { ++ CIMInstance providerModule; ++ CIMKeyBinding keyBinding( ++ _PROPERTY_PROVIDERMODULE_NAME, ++ moduleName, ++ CIMKeyBinding::STRING); ++ Array kbArray; ++ kbArray.append(keyBinding); ++ CIMObjectPath modulePath("", PEGASUS_NAMESPACENAME_INTEROP, ++ PEGASUS_CLASSNAME_PROVIDERMODULE, kbArray); ++ providerModule = ++ providerManagerService->_providerRegistrationManager-> ++ getInstance( ++ modulePath, false, false, CIMPropertyList()); ++ ++ Array removeStatus; ++ Array appendStatus; ++ removeStatus.append(CIM_MSE_OPSTATUS_VALUE_OK); ++ appendStatus.append(CIM_MSE_OPSTATUS_VALUE_DEGRADED); ++ providerManagerService->_updateProviderModuleStatus( ++ providerModule, removeStatus, appendStatus); ++ } ++ catch (const Exception & e) ++ { ++ PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2, ++ "Failed to update provider module status: " + ++ e.getMessage()); ++ } ++ ++ // ++ // Log a warning message since subscriptions were affected ++ // ++ Logger::put_l ( ++ Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING, ++ "ProviderManager.OOPProviderManagerRouter." ++ "OOP_PROVIDER_MODULE_SUBSCRIPTIONS_AFFECTED", ++ "The generation of indications by providers in module $0 " ++ "may be affected. To ensure these providers are serving " ++ "active subscriptions, disable and then re-enable this " ++ "module using the cimprovider command.", ++ moduleName); ++ } ++ } ++ ++ PEG_METHOD_EXIT(); ++} ++ + PEGASUS_NAMESPACE_END +--- pegasus/src/Pegasus/ProviderManager2/OOPProviderManagerRouter.h.obz5051 2006-02-28 14:53:30.000000000 -0500 ++++ pegasus/src/Pegasus/ProviderManager2/OOPProviderManagerRouter.h 2006-05-31 12:18:40.000000000 -0400 +@@ -51,6 +51,9 @@ + + PEGASUS_NAMESPACE_BEGIN + ++typedef void (*PEGASUS_PROVIDERMODULEFAIL_CALLBACK_T)(const String &, ++ const String &, Uint16); ++ + class ProviderAgentContainer; + + typedef HashTable, +@@ -62,7 +65,8 @@ + public: + OOPProviderManagerRouter( + PEGASUS_INDICATION_CALLBACK_T indicationCallback, +- PEGASUS_RESPONSE_CHUNK_CALLBACK_T responseChunkCallback); ++ PEGASUS_RESPONSE_CHUNK_CALLBACK_T responseChunkCallback, ++ PEGASUS_PROVIDERMODULEFAIL_CALLBACK_T providerModuleFailCallback); + + virtual ~OOPProviderManagerRouter(); + +@@ -85,13 +89,12 @@ + + /** + Return a pointer to the ProviderAgentContainer for the specified +- moduleName and userName. If no ProviderAgentContainer exists for +- this moduleName/userName pair, one is created in an uninitialized +- state. ++ module instance and requesting user. If no appropriate ++ ProviderAgentContainer exists, one is created in an uninitialized state. + */ + ProviderAgentContainer* _lookupProviderAgent( +- const String& moduleName, +- const String& userName); ++ const CIMInstance& providerModule, ++ CIMRequestMessage* request); + + /** + Return an array of pointers to ProviderAgentContainers for the +@@ -122,6 +125,12 @@ + PEGASUS_RESPONSE_CHUNK_CALLBACK_T _responseChunkCallback; + + /** ++ Callback function to be called upon detection of failure of a ++ provider module. ++ */ ++ PEGASUS_PROVIDERMODULEFAIL_CALLBACK_T _providerModuleFailCallback; ++ ++ /** + The _providerAgentTable contains a ProviderAgentContainer entry for + each of the Provider Agent processes for which a request has been + processed. ProviderAgentContainer objects are persistent; once one +--- pegasus/src/Pegasus/IndicationService/SubscriptionTable.cpp.obz5051 2006-01-30 11:17:55.000000000 -0500 ++++ pegasus/src/Pegasus/IndicationService/SubscriptionTable.cpp 2006-05-31 12:18:40.000000000 -0400 +@@ -159,11 +159,11 @@ + return matchingSubscriptions; + } + +-Array SubscriptionTable::getAndUpdateProviderSubscriptions ( ++Array SubscriptionTable::reflectProviderDisable ( + const CIMInstance & provider) + { + PEG_METHOD_ENTER (TRC_INDICATION_SERVICE, +- "SubscriptionTable::getAndUpdateProviderSubscriptions"); ++ "SubscriptionTable::reflectProviderDisable"); + + Array providerSubscriptions; + +@@ -230,40 +230,9 @@ + if (providerIndex != PEG_NOT_FOUND) + { + tableValue.providers.remove (providerIndex); +- if (tableValue.providers.size () > 0) +- { +- // +- // At least one provider is still serving the +- // subscription +- // Update entry in Active Subscriptions table +- // +- _removeActiveSubscriptionsEntry +- (activeSubscriptionsKey); +- _insertActiveSubscriptionsEntry +- (tableValue.subscription, tableValue.providers); +- } +- else +- { +- // +- // If the terminated provider was the only provider +- // serving the subscription, implement the +- // subscription's On Fatal Error Policy +- // +- Boolean removedOrDisabled = +- _subscriptionRepository->reconcileFatalError +- (tableValue.subscription); +- _removeActiveSubscriptionsEntry +- (activeSubscriptionsKey); +- if (!removedOrDisabled) +- { +- // +- // If subscription was not disabled or deleted +- // Update entry in Active Subscriptions table +- // +- _insertActiveSubscriptionsEntry +- (tableValue.subscription, tableValue.providers); +- } +- } ++ ++ _updateSubscriptionProviders (activeSubscriptionsKey, ++ tableValue.subscription, tableValue.providers); + } + else + { +@@ -293,6 +262,159 @@ + return providerSubscriptions; + } + ++Array ++SubscriptionTable::reflectProviderModuleFailure ++ (const String & moduleName, ++ const String & userName, ++ Boolean authenticationEnabled) ++{ ++ PEG_METHOD_ENTER (TRC_INDICATION_SERVICE, ++ "SubscriptionTable::reflectProviderModuleFailure"); ++ ++ Array providerModuleSubscriptions; ++ ++ // ++ // Iterate through the subscription table to find subscriptions served by ++ // a provider in the specified module, with the specified userName as the ++ // subscription creator ++ // NOTE: updating entries (remove and insert) while iterating through the ++ // table is not allowed ++ // The SubscriptionTable first iterates through the active subscriptions ++ // table to find matching subscriptions served by a provider in the ++ // specified module, then looks up and updates each affected subscription ++ // ++ { ++ // ++ // Acquire and hold the write lock during the entire ++ // lookup/remove/insert process, allowing competing threads to apply ++ // their logic over a consistent view of the data. ++ // Do not call any other methods that need ++ // _activeSubscriptionsTableLock. ++ // ++ WriteLock lock (_activeSubscriptionsTableLock); ++ ++ for (ActiveSubscriptionsTable::Iterator i = ++ _activeSubscriptionsTable.start (); i; i++) ++ { ++ ActiveSubscriptionsTableEntry tableValue; ++ // ++ // Get subscription creator ++ // ++ tableValue = i.value (); ++ String creator; ++ CIMValue creatorValue = tableValue.subscription.getProperty ++ (tableValue.subscription.findProperty ++ (PEGASUS_PROPERTYNAME_INDSUB_CREATOR)).getValue(); ++ creatorValue.get (creator); ++ ++ Array failedProviderList; ++ for (Uint32 j = 0; j < tableValue.providers.size (); j++) ++ { ++ // ++ // Get provider module name ++ // ++ String providerModuleName; ++ CIMValue nameValue = ++ tableValue.providers [j].providerModule.getProperty ++ (tableValue.providers [j].providerModule.findProperty ++ (_PROPERTY_NAME)).getValue (); ++ nameValue.get (providerModuleName); ++ ++ // ++ // Get module user context setting ++ // ++ Uint16 moduleContext = PEGASUS_DEFAULT_PROV_USERCTXT; ++ CIMValue contextValue = ++ tableValue.providers [j].providerModule.getProperty ++ (tableValue.providers [j].providerModule.findProperty ++ (PEGASUS_PROPERTYNAME_MODULE_USERCONTEXT)).getValue (); ++ if (!contextValue.isNull ()) ++ { ++ contextValue.get (moduleContext); ++ } ++ ++ // ++ // If provider module name matches, ++ // add provider to the list of failed providers ++ // ++ if (providerModuleName == moduleName) ++ { ++ // ++ // If authentication is enabled, and module was run as ++ // requestor, subscription creator must also match module ++ // user context name, to add provider to the list of ++ // failed providers ++ // ++ if ((moduleContext != PG_PROVMODULE_USERCTXT_REQUESTOR) || ++ (!authenticationEnabled) || (creator == userName)) ++ { ++ // ++ // Add the provider to the list ++ // ++ failedProviderList.append ++ (tableValue.providers [j]); ++ } ++ } // if provider module name matches ++ } // for each subscription provider ++ ++ // ++ // If there were any failed providers, add the subscription ++ // entry to the list of affected subscriptions ++ // ++ if (failedProviderList.size () > 0) ++ { ++ ActiveSubscriptionsTableEntry subscription; ++ subscription.subscription = tableValue.subscription; ++ subscription.providers = failedProviderList; ++ providerModuleSubscriptions.append (subscription); ++ } ++ } ++ ++ // ++ // Look up and update hash table entry for each affected subscription ++ // ++ for (Uint32 k = 0; k < providerModuleSubscriptions.size (); k++) ++ { ++ // ++ // Update the entry in the active subscriptions hash table ++ // ++ CIMObjectPath activeSubscriptionsKey = ++ _generateActiveSubscriptionsKey ++ (providerModuleSubscriptions [k].subscription.getPath ()); ++ ActiveSubscriptionsTableEntry tableValue; ++ if (_activeSubscriptionsTable.lookup (activeSubscriptionsKey, ++ tableValue)) ++ { ++ Array updatedProviderList; ++ for (Uint32 l = 0; l < tableValue.providers.size (); l++) ++ { ++ String providerModuleName; ++ CIMValue nameValue = ++ tableValue.providers [l].providerModule.getProperty ++ (tableValue.providers [l].providerModule.findProperty ++ (_PROPERTY_NAME)).getValue (); ++ nameValue.get (providerModuleName); ++ if (providerModuleName != moduleName) ++ { ++ // ++ // Provider is not in the failed module ++ // Append provider to list of providers still serving ++ // the subscription ++ // ++ updatedProviderList.append (tableValue.providers [l]); ++ } ++ } ++ ++ _updateSubscriptionProviders (activeSubscriptionsKey, ++ tableValue.subscription, updatedProviderList); ++ } ++ } ++ } ++ ++ PEG_METHOD_EXIT (); ++ return providerModuleSubscriptions; ++} ++ + CIMObjectPath SubscriptionTable::_generateActiveSubscriptionsKey ( + const CIMObjectPath & subscription) const + { +@@ -494,6 +616,51 @@ + PEG_METHOD_EXIT (); + } + ++void SubscriptionTable::_updateSubscriptionProviders ++ (const CIMObjectPath & activeSubscriptionsKey, ++ const CIMInstance & subscription, ++ const Array & updatedProviderList) ++{ ++ PEG_METHOD_ENTER (TRC_INDICATION_SERVICE, ++ "SubscriptionTable::_updateSubscriptionProviders"); ++ ++ if (updatedProviderList.size () > 0) ++ { ++ // ++ // At least one provider is still serving the ++ // subscription ++ // Update entry in Active Subscriptions table ++ // ++ _removeActiveSubscriptionsEntry (activeSubscriptionsKey); ++ _insertActiveSubscriptionsEntry (subscription, updatedProviderList); ++ } ++ else ++ { ++ // ++ // The disabled or failed provider(s) was (were) the only provider(s) ++ // serving the subscription ++ // Implement the subscription's On Fatal Error Policy ++ // ++ Boolean removedOrDisabled = ++ _subscriptionRepository->reconcileFatalError (subscription); ++ _removeActiveSubscriptionsEntry (activeSubscriptionsKey); ++ if (!removedOrDisabled) ++ { ++ // ++ // If subscription was not disabled or deleted ++ // Update entry in Active Subscriptions table ++ // Note that in this case the updatedProviderList is ++ // empty - no providers are serving the subscription ++ // currently ++ // ++ _insertActiveSubscriptionsEntry (subscription, ++ updatedProviderList); ++ } ++ } ++ ++ PEG_METHOD_EXIT (); ++} ++ + void SubscriptionTable::insertSubscription ( + const CIMInstance & subscription, + const Array & providers, +--- pegasus/src/Pegasus/IndicationService/SubscriptionTable.h.obz5051 2006-01-30 11:17:55.000000000 -0500 ++++ pegasus/src/Pegasus/IndicationService/SubscriptionTable.h 2006-05-31 12:18:40.000000000 -0400 +@@ -289,10 +289,41 @@ + + @return list of CIMInstance subscriptions + */ +- Array getAndUpdateProviderSubscriptions ( ++ Array reflectProviderDisable ( + const CIMInstance & provider); + + /** ++ Retrieves a list of subscription table entries for subscriptions that ++ were being served by providers in the specified provider module, where ++ the subscription creator matches the specified provider module userName. ++ The Active Subscriptions table is updated to reflect the fact that these ++ subscriptions are no longer being served by the provider(s) in the ++ failed provider module. ++ This method is called when notification is received that the specified ++ provider module has failed. In the Active Subscriptions table, any ++ provider in the specified provider module is removed from the list of ++ providers serving the subscription. ++ The returned list of Active Subscriptions table entries includes for ++ each subscription only those providers that are in the specified ++ (failed) provider module and therefore are no longer serving the ++ subscription. ++ ++ @param moduleName the provider module name ++ @param userName the user name for the context in which ++ the provider module was invoked ++ @param authenticationEnabled indicates whether authentication is ++ currently enabled ++ ++ @return list of ActiveSubscriptionsTableEntry structs including the ++ subscriptions served by providers in the specified provider ++ module ++ */ ++ Array reflectProviderModuleFailure ( ++ const String & moduleName, ++ const String & userName, ++ Boolean authenticationEnabled); ++ ++ /** + Determines if the specified provider is in the list of providers + serving the subscription. + +@@ -431,6 +462,21 @@ + const String & key); + + /** ++ Updates the providers for an entry in the Active Subscriptions table. ++ The caller must first lock the _activeSubscriptionsTableLock for write ++ access. ++ ++ @param activeSubscriptionsKey the key of the entry to update ++ @param subscription the subscription instance for the entry ++ @param updatedProviderList the updated list of providers for the ++ entry (may be empty) ++ */ ++ void _updateSubscriptionProviders ( ++ const CIMObjectPath & activeSubscriptionsKey, ++ const CIMInstance & subscription, ++ const Array & updatedProviderList); ++ ++ /** + Active Subscriptions information table. Access to this table is + controlled by the _activeSubscriptionsTableLock. + */ +--- pegasus/src/Pegasus/IndicationService/IndicationService.cpp.obz5051 2006-02-10 17:20:43.000000000 -0500 ++++ pegasus/src/Pegasus/IndicationService/IndicationService.cpp 2006-05-31 12:18:40.000000000 -0400 +@@ -110,6 +110,7 @@ + _cimRepository(repository) + { + _enableSubscriptionsForNonprivilegedUsers = false; ++ _authenticationEnabled = true; + + try + { +@@ -126,6 +127,7 @@ + } + else + { ++ _authenticationEnabled = false; + // Authentication needs to be enabled to perform authorization + // tests. + _enableSubscriptionsForNonprivilegedUsers = true; +@@ -357,6 +359,17 @@ + } + break; + ++ case CIM_NOTIFY_PROVIDER_FAIL_REQUEST_MESSAGE: ++ try ++ { ++ _handleNotifyProviderFailRequest (message); ++ } ++ catch (...) ++ { ++ ; ++ } ++ break; ++ + default: + // + // A message type not supported by the Indication Service +@@ -1410,7 +1423,7 @@ + (const Message* message) + { + PEG_METHOD_ENTER (TRC_INDICATION_SERVICE, +- "IndicationService::_handleEnumerateInstancesNamesRequest"); ++ "IndicationService::_handleEnumerateInstanceNamesRequest"); + + CIMEnumerateInstanceNamesRequestMessage* request = + (CIMEnumerateInstanceNamesRequestMessage*) message; +@@ -2879,12 +2892,12 @@ + // + // Get list of affected subscriptions + // +- // _subscriptionTable->getAndUpdateProviderSubscriptions also updates the ++ // _subscriptionTable->reflectProviderDisable also updates the + // Active Subscriptions hash table, and implements each subscription's + // On Fatal Error policy, if necessary + // + providerSubscriptions.clear (); +- providerSubscriptions = _subscriptionTable->getAndUpdateProviderSubscriptions ++ providerSubscriptions = _subscriptionTable->reflectProviderDisable + (providers [i]); + + if (providerSubscriptions.size () > 0) +@@ -3240,6 +3253,41 @@ + PEG_METHOD_EXIT (); + } + ++void IndicationService::_handleNotifyProviderFailRequest ++ (Message * message) ++{ ++ PEG_METHOD_ENTER (TRC_INDICATION_SERVICE, ++ "IndicationService::_handleNotifyProviderFailRequest"); ++ ++ CIMNotifyProviderFailRequestMessage * request = ++ dynamic_cast (message); ++ ++ String moduleName = request->moduleName; ++ String userName = request->userName; ++ ++ // ++ // Determine providers in module that were serving active subscriptions ++ // and update the Active Subscriptions Table ++ // ++ Array providerModuleSubscriptions = ++ _subscriptionTable->reflectProviderModuleFailure ++ (moduleName, userName, _authenticationEnabled); ++ ++ // ++ // FUTURE: Attempt to recreate the subscription state ++ // ++ ++ // ++ // Send response ++ // ++ CIMResponseMessage * response = request->buildResponse (); ++ CIMNotifyProviderFailResponseMessage * failResponse = ++ (CIMNotifyProviderFailResponseMessage *) response; ++ failResponse->numSubscriptionsAffected = ++ providerModuleSubscriptions.size (); ++ _enqueueResponse (request, response); ++} ++ + Boolean IndicationService::_canCreate ( + CIMInstance & instance, + const CIMNamespaceName & nameSpace) +@@ -6366,6 +6414,15 @@ + return; + } + ++ // ++ // Update subscription hash tables ++ // ++ _subscriptionTable->removeSubscription ++ (subscription, ++ indicationSubclasses, ++ nameSpace, ++ indicationProviders); ++ + CIMRequestMessage * aggRequest = 0; + + if (origRequest == 0) +@@ -6856,21 +6913,6 @@ + } + + // +- // Update subscription hash tables +- // Delete Instance, Modify Instance, or Delete Referencing or Expired +- // Subscription +- // +- CIMDeleteSubscriptionRequestMessage * request = +- (CIMDeleteSubscriptionRequestMessage *) +- operationAggregate->getRequest (0); +- +- _subscriptionTable->removeSubscription +- (request->subscriptionInstance, +- operationAggregate->getIndicationSubclasses (), +- request->nameSpace, +- checkProviders); +- +- // + // For Delete Instance or Modify Instance request, send response + // + if (operationAggregate->requiresResponse ()) +--- pegasus/src/Pegasus/IndicationService/IndicationService.h.obz5051 2006-01-30 11:17:55.000000000 -0500 ++++ pegasus/src/Pegasus/IndicationService/IndicationService.h 2006-05-31 12:18:40.000000000 -0400 +@@ -173,6 +173,16 @@ + void _handleNotifyProviderEnableRequest (const Message * message); + + /** ++ Notifies the Indication Service that failure of a provider module that ++ included at least one indication provider has been detected. ++ The Indication Service retrieves the subscriptions served by providers ++ in the failed module. The Indication Service returns in the response ++ the number of affected subscriptions, so the sender of the request ++ knows if any subscriptions were affected. ++ */ ++ void _handleNotifyProviderFailRequest (Message * message); ++ ++ /** + Determines if it is legal to create an instance. + Checks for existence of all key and required properties. Checks that + properties that MUST NOT exist (based on values of other properties), +@@ -1186,6 +1196,12 @@ + Boolean _enableSubscriptionsForNonprivilegedUsers; + + /** ++ Boolean indicating whether authentication is currently enabled in the ++ CIM Server. ++ */ ++ Boolean _authenticationEnabled; ++ ++ /** + Gets the indication class specified by the subscription filter query. + + @param instance the subscription instance +--- pegasus/src/Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.cpp.obz5051 2006-03-10 16:47:07.000000000 -0500 ++++ pegasus/src/Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.cpp 2006-05-31 12:18:40.000000000 -0400 +@@ -1719,53 +1719,48 @@ + const String & providerModuleName) + { + Array _providerModuleStatus; +- Array instances; +- +- // +- // create the key by using providerModuleName and MODULE_KEY +- // +- String _moduleKey = _generateKey(providerModuleName, MODULE_KEY); +- +- // +- // Find the entry whose key's value is same as _moduleKey +- // get provider module status from the value +- // +- ProviderRegistrationTable* _providerModule = 0; + + ReadLock lock(_registrationTableLock); + +- if (!_registrationTable->table.lookup(_moduleKey, _providerModule)) +- { +-// l10n +- +- // throw (CIMException(CIM_ERR_FAILED, MODULE_NOT_FOUND)); +- +- MessageLoaderParms mlp(MessageLoaderParms(MODULE_NOT_FOUND_KEY, MODULE_NOT_FOUND)); ++ _providerModuleStatus = _getProviderModuleStatus (providerModuleName); + +- throw (CIMException(CIM_ERR_FAILED, mlp)); ++ return (_providerModuleStatus); + } + +- instances = _providerModule->getInstances(); ++Boolean ProviderRegistrationManager::updateProviderModuleStatus( ++ const String& providerModuleName, ++ const Array& removeStatus, ++ const Array& appendStatus, ++ Array& outStatus) ++{ ++ WriteLock lock(_registrationTableLock); ++ ++ outStatus = _getProviderModuleStatus (providerModuleName); + + // +- // ATTN-CAKG-P2-20020821: Check for null status? ++ // Remove any status elements to be removed + // +- instances[0].getProperty(instances[0].findProperty +- (_PROPERTY_OPERATIONALSTATUS)).getValue().get(_providerModuleStatus); +- +- return (_providerModuleStatus); ++ for (Uint32 j = 0; j < removeStatus.size(); j++) ++ { ++ for (Uint32 i = outStatus.size(); i > 0; i--) ++ { ++ if (outStatus[i-1] == removeStatus[j]) ++ { ++ outStatus.remove(i-1); ++ } ++ } + } + +-Boolean ProviderRegistrationManager::setProviderModuleStatus( +- const String & providerModuleName, +- Array status) +-{ + // +- // create the key by using providerModuleName and MODULE_KEY ++ // Append any status elements to be appended, if not already in the array + // +- String _moduleKey = _generateKey(providerModuleName, MODULE_KEY); +- +- WriteLock lock(_registrationTableLock); ++ for (Uint32 k = 0; k < appendStatus.size(); k++) ++ { ++ if (!Contains (outStatus, appendStatus[k])) ++ { ++ outStatus.append(appendStatus[k]); ++ } ++ } + + // + // find the instance from repository +@@ -1784,7 +1779,7 @@ + // + _repository->setProperty( + PEGASUS_NAMESPACENAME_INTEROP, +- reference, _PROPERTY_OPERATIONALSTATUS, status); ++ reference, _PROPERTY_OPERATIONALSTATUS, outStatus); + + // + // get instance from the repository +@@ -1800,8 +1795,8 @@ + // + // remove old entry from table + // ++ String _moduleKey = _generateKey(providerModuleName, MODULE_KEY); + ProviderRegistrationTable* _entry = 0; +- + if (_registrationTable->table.lookup(_moduleKey, _entry)) + { + delete _entry; +@@ -1815,6 +1810,12 @@ + instances.append(_instance); + _addInstancesToTable(_moduleKey, instances); + } ++ catch (const Exception & e) ++ { ++ PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2, ++ "Failed to update provider module status: " + e.getMessage()); ++ return false; ++ } + catch (...) + { + return (false); +@@ -4061,6 +4062,37 @@ + } + } + ++Array ProviderRegistrationManager::_getProviderModuleStatus( ++ const String& providerModuleName) ++{ ++ Array outStatus; ++ ++ // ++ // Create the key using providerModuleName and MODULE_KEY ++ // ++ String _moduleKey = _generateKey(providerModuleName, MODULE_KEY); ++ ++ // ++ // Look up the module in the provider registration table ++ // ++ ProviderRegistrationTable* _providerModule = 0; ++ if (!_registrationTable->table.lookup(_moduleKey, _providerModule)) ++ { ++ MessageLoaderParms mlp(MessageLoaderParms(MODULE_NOT_FOUND_KEY, ++ MODULE_NOT_FOUND)); ++ throw CIMException(CIM_ERR_FAILED, mlp); ++ } ++ ++ // ++ // Get the Operational Status from the module instance in the table ++ // ++ Array moduleInstances; ++ moduleInstances = _providerModule->getInstances(); ++ moduleInstances[0].getProperty(moduleInstances[0].findProperty( ++ _PROPERTY_OPERATIONALSTATUS)).getValue().get(outStatus); ++ ++ return outStatus; ++} + + Array WildCardNamespaceNames::_nsstr; + Array WildCardNamespaceNames::_nsl; +--- pegasus/src/Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h.obz5051 2006-01-30 11:18:33.000000000 -0500 ++++ pegasus/src/Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h 2006-05-31 12:18:40.000000000 -0400 +@@ -328,7 +328,37 @@ + + Array getProviderModuleStatus(const String & providerModuleName); + +- Boolean setProviderModuleStatus(const String & providerModuleName, Array status); ++ /** ++ Updates the Provider Module Status. The value of the ++ OperationalStatus property is updated in the Provider Module ++ instance in the repository, and in the provider registration table. ++ If any removeStatus values are specified, each one of the values ++ found in the current OperationalStatus property value is removed ++ from the array. If any appendStatus values are specified, each one ++ of the values not found in the current OperationalStatus property ++ value is appended to the array. The resulting OperationalStatus ++ property value is returned in the output outStatus parameter. ++ ++ @param providerModuleName String specifying name of the provider ++ module whose status is to be updated ++ ++ @param removeStatus Array of Uint16 specifying values to be ++ removed from the status array (may be empty) ++ ++ @param appendStatus Array of Uint16 specifying values to be ++ appended to the status array (may be empty) ++ ++ @param outStatus OUTPUT Array of Uint16 returning the resulting ++ status array after update ++ ++ @return True if provider module status is successfully updated; ++ False, otherwise ++ */ ++ Boolean updateProviderModuleStatus( ++ const String& providerModuleName, ++ const Array& removeStatus, ++ const Array& appendStatus, ++ Array& outStatus); + + /** + Iterate through registration hash table, if AutoStart property +@@ -477,6 +507,22 @@ + */ + void _setStatus(const Array & status, CIMInstance & moduleInstance); + ++ /** ++ Gets the Provider Module Status. The value of the OperationalStatus ++ property is retrieved from the Provider Module instance in the ++ provider registration table. ++ ++ @param providerModuleName String specifying name of the provider ++ module whose status is to be retrieved ++ ++ @exception CIMException(CIM_ERR_FAILED) if the specified provider ++ module is not found. ++ ++ @return Array of Uint16 containing the OperationalStatus property ++ value ++ */ ++ Array _getProviderModuleStatus( ++ const String& providerModuleName); + }; + + class PEGASUS_PRM_LINKAGE WildCardNamespaceNames { +--- pegasus/src/Pegasus/msg/Server/pegasusServer_en.txt.obz5051 2006-05-31 11:42:03.000000000 -0400 ++++ pegasus/src/Pegasus/msg/Server/pegasusServer_en.txt 2006-05-31 12:18:40.000000000 -0400 +@@ -1275,6 +1275,28 @@ + + ProviderManager.ProviderManagerService.DISABLE_PROVIDER_FAILED:string {"PGS04006: Failed to disable the provider."} + ++ /** ++ * @note PGS04007 ++ * Substitution {0} is the name of a provider module (a string) ++ * Substitution {1} is the name of a system user (a string) ++ * @version 2.6 ++ */ ++ ProviderManager.ProviderManagerService.OOP_PROVIDER_MODULE_USER_CTXT_FAILURE_DETECTED:string {"PGS04007: A failure was detected in provider module {0} with user context {1}."} ++ ++ /** ++ * @note PGS04008 ++ * Substitution {0} is the name of a provider module (a string) ++ * @version 2.6 ++ */ ++ ProviderManager.ProviderManagerService.OOP_PROVIDER_MODULE_FAILURE_DETECTED:string {"PGS04008: A failure was detected in provider module {0}."} ++ ++ /** ++ * @note PGS04009 ++ * Substitution {0} is the name of a provider module (a string) ++ * @version 2.6 ++ */ ++ ProviderManager.ProviderManagerService.OOP_PROVIDER_MODULE_SUBSCRIPTIONS_AFFECTED:string {"PGS04009: The generation of indications by providers in module {0} may be affected. To ensure these providers are serving active subscriptions, disable and then re-enable this module using the cimprovider command."} ++ + + // ========================================================== + // Messages for ProviderModule +@@ -4394,6 +4416,7 @@ + /** + * @note PGS13606 + * Substitution {0} is a string ID for a provider module name ++ * This message is no longer used as of version 2.6.0 + * @version 2.5.1 + */ + ProviderManager.OOPProviderManagerRouter.OOP_PROVIDER_MODULE_FAILURE_DETECTED:string {"PGS13606: A failure was detected in provider module {0}. The generation of indications by providers in this module may be affected. To ensure these providers are serving active subscriptions, disable and then re-enable this module using the cimprovider command."} +--- pegasus/src/Pegasus/Common/Message.cpp.obz5051 2006-01-30 11:17:05.000000000 -0500 ++++ pegasus/src/Pegasus/Common/Message.cpp 2006-05-31 12:18:40.000000000 -0400 +@@ -214,6 +214,9 @@ + "CIM_NOTIFY_PROVIDER_ENABLE_REQUEST_MESSAGE", + "CIM_NOTIFY_PROVIDER_ENABLE_RESPONSE_MESSAGE", + ++ "CIM_NOTIFY_PROVIDER_FAIL_REQUEST_MESSAGE", ++ "CIM_NOTIFY_PROVIDER_FAIL_RESPONSE_MESSAGE", ++ + "CIM_INITIALIZE_PROVIDER_REQUEST_MESSAGE", + "CIM_INITIALIZE_PROVIDER_RESPONSE_MESSAGE", + +--- pegasus/src/Pegasus/Common/Constants.h.obz5051 2006-01-30 11:16:48.000000000 -0500 ++++ pegasus/src/Pegasus/Common/Constants.h 2006-05-31 12:18:40.000000000 -0400 +@@ -464,6 +464,7 @@ + + // Constants defining the operational status of a CIM_ManagedSystemElement + #define CIM_MSE_OPSTATUS_VALUE_OK 2 ++#define CIM_MSE_OPSTATUS_VALUE_DEGRADED 3 + #define CIM_MSE_OPSTATUS_VALUE_STOPPING 9 + #define CIM_MSE_OPSTATUS_VALUE_STOPPED 10 + +@@ -472,6 +473,7 @@ + #define PG_PROVMODULE_USERCTXT_DESIGNATED 3 + #define PG_PROVMODULE_USERCTXT_PRIVILEGED 4 + #define PG_PROVMODULE_USERCTXT_CIMSERVER 5 ++#define PEGASUS_DEFAULT_PROV_USERCTXT PG_PROVMODULE_USERCTXT_PRIVILEGED + + // Standard Pegasus Global Prefix. + // This prefix is used as the basis for pegasus defined classes +--- pegasus/src/Pegasus/Common/CIMMessageDeserializer.cpp.obz5051 2006-03-03 15:21:57.000000000 -0500 ++++ pegasus/src/Pegasus/Common/CIMMessageDeserializer.cpp 2006-05-31 12:18:40.000000000 -0400 +@@ -298,6 +298,10 @@ + break; + case CIM_INITIALIZE_PROVIDER_REQUEST_MESSAGE: + message = _deserializeCIMInitializeProviderRequestMessage(parser); ++ //case CIM_NOTIFY_PROVIDER_FAIL_REQUEST_MESSAGE: ++ // ATTN: No need to deserialize this yet ++ //message = _deserializeCIMNotifyProviderFailRequestMessage(parser); ++ //break; + break; + case CIM_INITIALIZE_PROVIDER_AGENT_REQUEST_MESSAGE: + message = +@@ -456,6 +460,10 @@ + break; + case CIM_INITIALIZE_PROVIDER_RESPONSE_MESSAGE: + message = _deserializeCIMInitializeProviderResponseMessage(parser); ++ //case CIM_NOTIFY_PROVIDER_FAIL_RESPONSE_MESSAGE: ++ // ATTN: No need to deserialize this yet ++ //message = _deserializeCIMNotifyProviderFailResponseMessage(parser); ++ //break; + break; + case CIM_INITIALIZE_PROVIDER_AGENT_RESPONSE_MESSAGE: + message = +--- pegasus/src/Pegasus/Common/CIMMessageSerializer.cpp.obz5051 2006-02-28 14:53:29.000000000 -0500 ++++ pegasus/src/Pegasus/Common/CIMMessageSerializer.cpp 2006-05-31 12:18:40.000000000 -0400 +@@ -280,6 +280,11 @@ + // out, (CIMNotifyProviderEnableRequestMessage*)cimMessage); + break; + case CIM_STOP_ALL_PROVIDERS_REQUEST_MESSAGE: ++ //case CIM_NOTIFY_PROVIDER_FAIL_REQUEST_MESSAGE: ++ // ATTN: No need to serialize this yet ++ //_serializeCIMNotifyProviderFailRequestMessage( ++ // out, (CIMNotifyProviderFailRequestMessage*)cimMessage); ++ //break; + _serializeCIMStopAllProvidersRequestMessage( + out, (CIMStopAllProvidersRequestMessage*)cimMessage); + break; +@@ -469,6 +474,11 @@ + // out, (CIMNotifyProviderEnableResponseMessage*)cimMessage); + break; + case CIM_STOP_ALL_PROVIDERS_RESPONSE_MESSAGE: ++ //case CIM_NOTIFY_PROVIDER_FAIL_RESPONSE_MESSAGE: ++ // ATTN: No need to serialize this yet ++ //_serializeCIMNotifyProviderFailResponseMessage( ++ // out, (CIMNotifyProviderFailResponseMessage*)cimMessage); ++ //break; + _serializeCIMStopAllProvidersResponseMessage( + out, (CIMStopAllProvidersResponseMessage*)cimMessage); + break; +--- pegasus/src/Pegasus/Common/Message.h.obz5051 2006-01-30 11:17:05.000000000 -0500 ++++ pegasus/src/Pegasus/Common/Message.h 2006-05-31 12:18:40.000000000 -0400 +@@ -521,6 +521,9 @@ + CIM_NOTIFY_PROVIDER_ENABLE_REQUEST_MESSAGE, + CIM_NOTIFY_PROVIDER_ENABLE_RESPONSE_MESSAGE, + ++ CIM_NOTIFY_PROVIDER_FAIL_REQUEST_MESSAGE, ++ CIM_NOTIFY_PROVIDER_FAIL_RESPONSE_MESSAGE, ++ + CIM_INITIALIZE_PROVIDER_REQUEST_MESSAGE, + CIM_INITIALIZE_PROVIDER_RESPONSE_MESSAGE, + +--- pegasus/src/Pegasus/Common/CIMMessage.cpp.obz5051 2006-02-28 14:53:29.000000000 -0500 ++++ pegasus/src/Pegasus/Common/CIMMessage.cpp 2006-05-31 12:18:40.000000000 -0400 +@@ -473,6 +473,17 @@ + return response.release(); + } + ++CIMResponseMessage* CIMNotifyProviderFailRequestMessage::buildResponse() const ++{ ++ AutoPtr response( ++ new CIMNotifyProviderFailResponseMessage( ++ messageId, ++ CIMException(), ++ queueIds.copyAndPop())); ++ response->syncAttributes(this); ++ return response.release(); ++} ++ + CIMResponseMessage* CIMStopAllProvidersRequestMessage::buildResponse() + { + AutoPtr response( +--- pegasus/src/Pegasus/Common/CIMMessage.h.obz5051 2006-02-28 14:53:29.000000000 -0500 ++++ pegasus/src/Pegasus/Common/CIMMessage.h 2006-05-31 12:18:40.000000000 -0400 +@@ -1373,6 +1373,30 @@ + Array capInstances; + }; + ++class PEGASUS_COMMON_LINKAGE CIMNotifyProviderFailRequestMessage ++ : public CIMRequestMessage ++{ ++public: ++ CIMNotifyProviderFailRequestMessage( ++ const String & messageId_, ++ const String & moduleName_, ++ const String & userName_, ++ const QueueIdStack& queueIds_) ++ : CIMRequestMessage( ++ CIM_NOTIFY_PROVIDER_FAIL_REQUEST_MESSAGE, ++ messageId_, ++ queueIds_), ++ moduleName(moduleName_), ++ userName(userName_) ++ { ++ } ++ ++ virtual CIMResponseMessage* buildResponse() const; ++ ++ String moduleName; ++ String userName; ++}; ++ + class PEGASUS_COMMON_LINKAGE CIMStopAllProvidersRequestMessage + : public CIMRequestMessage + { +@@ -2067,6 +2091,22 @@ + } + }; + ++class PEGASUS_COMMON_LINKAGE CIMNotifyProviderFailResponseMessage ++ : public CIMResponseMessage ++{ ++public: ++ CIMNotifyProviderFailResponseMessage( ++ const String& messageId_, ++ const CIMException& cimException_, ++ const QueueIdStack& queueIds_) ++ : CIMResponseMessage(CIM_NOTIFY_PROVIDER_FAIL_RESPONSE_MESSAGE, ++ messageId_, cimException_, queueIds_) ++ { ++ } ++ ++ Uint32 numSubscriptionsAffected; ++}; ++ + class PEGASUS_COMMON_LINKAGE CIMStopAllProvidersResponseMessage + : public CIMResponseMessage + { +--- pegasus/src/Providers/TestProviders/Makefile.obz5051 2006-02-07 14:02:01.000000000 -0500 ++++ pegasus/src/Providers/TestProviders/Makefile 2006-05-31 12:18:40.000000000 -0400 +@@ -51,6 +51,8 @@ + MethodTestProvider \ + MethodTestProvider/testclient \ + MCCA_TestAssocProvider \ ++ OOPModuleFailureProvider \ ++ OOPModuleFailureProvider/testclient \ + PG_TestPropertyTypes \ + ProcessIndicationProvider \ + UserContextTestProvider \ +--- pegasus/src/Providers/TestProviders/Load/Makefile.obz5051 2006-03-07 13:22:31.000000000 -0500 ++++ pegasus/src/Providers/TestProviders/Load/Makefile 2006-05-31 12:18:40.000000000 -0400 +@@ -128,6 +128,8 @@ + @ cimmofl "-R$(REPOSITORY_DIR)" "-N$(REPOSITORY_NAME)" "-M$(REPOSITORY_MODE)" "-n$(INTEROPNS)" UserContextCIMServerR.mof + endif + endif ++ @ $(ECHO) +++++ Loading OOPModuleFailureTestProvider class definitions into $(TESTPROVIDERNS) namespace ... ++ @ cimmofl "-R$(REPOSITORY_DIR)" "-N$(REPOSITORY_NAME)" "-M$(REPOSITORY_MODE)" "-n$(TESTPROVIDERNS)" FailureTestIndication.mof + + ## + ## Load the test MOF with cimmof. (Do not remove the existing repository.) +@@ -192,6 +194,8 @@ + @ cimmof "-n$(INTEROPNS)" UserContextCIMServerR.mof + endif + endif ++ @ $(ECHO) +++++ Loading OOPModuleFailureTestProvider class definitions into $(TESTPROVIDERNS) namespace ... ++ @ cimmof "-R$(REPOSITORY_DIR)" "-N$(REPOSITORY_NAME)" "-M$(REPOSITORY_MODE)" "-n$(TESTPROVIDERNS)" FailureTestIndication.mof + + ## + ## diff --git a/pegasus-2.5.1-obz5053.patch b/pegasus-2.5.1-obz5053.patch new file mode 100644 index 0000000..6b2523b --- /dev/null +++ b/pegasus-2.5.1-obz5053.patch @@ -0,0 +1,240 @@ +--- pegasus/src/Pegasus/Common/HTTPConnection.cpp.obz5053 2006-05-31 14:05:14.000000000 -0400 ++++ pegasus/src/Pegasus/Common/HTTPConnection.cpp 2006-05-31 14:05:14.000000000 -0400 +@@ -1036,20 +1036,23 @@ + // reserve space for entire non-chunked message + if (_contentLength > 0) + { +- try +- { +- Uint32 capacity = (Uint32)(_contentLength + _contentOffset + 1); +- _incomingBuffer.reserveCapacity(capacity); +- data = (char *)_incomingBuffer.getData(); +- data[capacity-1] = 0; +- }catch(const PEGASUS_STD(bad_alloc)&) +- { +- _throwEventFailure(HTTP_STATUS_REQUEST_TOO_LARGE, +- "Error reserving space for non-chunked message"); +- }catch(...) +- { +- _throwEventFailure(httpStatusInternal, "unexpected exception"); +- } ++ try ++ { ++ Uint32 capacity = (Uint32)(_contentLength + ++ _contentOffset + 1); ++ _incomingBuffer.reserveCapacity(capacity); ++ data = (char *)_incomingBuffer.getData(); ++ data[capacity-1] = 0; ++ } ++ catch(const PEGASUS_STD(bad_alloc)&) ++ { ++ _throwEventFailure(HTTP_STATUS_REQUEST_TOO_LARGE, ++ "Error reserving space for non-chunked message"); ++ } ++ catch(...) ++ { ++ _throwEventFailure(httpStatusInternal, "unexpected exception"); ++ } + } + + break; +--- pegasus/src/Pegasus/Common/tests/Array/Array.cpp.obz5053 2006-01-30 11:17:15.000000000 -0500 ++++ pegasus/src/Pegasus/Common/tests/Array/Array.cpp 2006-05-31 14:34:16.000000000 -0400 +@@ -189,7 +189,7 @@ + { + Array arr(0xffff0000); + } +- catch (const NullPointer&) ++ catch (const PEGASUS_STD(bad_alloc)&) + { + exceptionCaught = true; + } +@@ -201,7 +201,7 @@ + { + Array arr(0xffff0000, 100); + } +- catch (const NullPointer&) ++ catch (const PEGASUS_STD(bad_alloc)&) + { + exceptionCaught = true; + } +@@ -214,7 +214,7 @@ + Uint32 myInt = 50; + Array arr(&myInt, 0xffff0000); + } +- catch (const NullPointer&) ++ catch (const PEGASUS_STD(bad_alloc)&) + { + exceptionCaught = true; + } +@@ -224,7 +224,16 @@ + { + Array arr(128); + PEGASUS_TEST_ASSERT(arr.getCapacity() == 128); +- arr.reserveCapacity(0xffff0000); ++ exceptionCaught = false; ++ try ++ { ++ arr.reserveCapacity(0xffff0000); ++ } ++ catch (const PEGASUS_STD(bad_alloc)&) ++ { ++ exceptionCaught = true; ++ } ++ PEGASUS_TEST_ASSERT(exceptionCaught); + PEGASUS_TEST_ASSERT(arr.getCapacity() == 128); + } + } +--- pegasus/src/Pegasus/Common/InternalException.h.obz5053 2006-01-30 11:17:04.000000000 -0500 ++++ pegasus/src/Pegasus/Common/InternalException.h 2006-05-31 14:05:14.000000000 -0400 +@@ -619,6 +619,18 @@ + #define PEGASUS_CIM_EXCEPTION_L(CODE, MSG_PARMS) \ + TraceableCIMException(CODE, MSG_PARMS, String(__FILE__), __LINE__) + ++/** Macro to prevent overflow of a signed int value when said value is ++ * doubled. If String/Array/Buffer size is greater than 0x3FFFFFFF, then ++ * something is suspect, throw bad_alloc exception. ++ */ ++#define PEGASUS_CHECK_CAPACITY_OVERFLOW(capacity) \ ++ do \ ++ { \ ++ if (capacity > 0x3FFFFFFF) \ ++ throw PEGASUS_STD(bad_alloc)(); \ ++ } \ ++ while (0) ++ + PEGASUS_NAMESPACE_END + + #endif /* Pegasus_InternalException_h */ +--- pegasus/src/Pegasus/Common/ArrayRep.h.obz5053 2006-01-30 11:16:46.000000000 -0500 ++++ pegasus/src/Pegasus/Common/ArrayRep.h 2006-05-31 14:05:14.000000000 -0400 +@@ -145,9 +145,10 @@ + } + + // Test for Uint32 overflow in the memory allocation size ++ // throw a bad_alloc exception if overflow would occur. + if (initialCapacity > (Uint32(0xffffffff)-sizeof(ArrayRep))/sizeof(T)) + { +- return 0; ++ throw PEGASUS_STD(bad_alloc)(); + } + + // Create object: +--- pegasus/src/Pegasus/Common/ArrayImpl.h.obz5053 2006-01-30 11:16:45.000000000 -0500 ++++ pegasus/src/Pegasus/Common/ArrayImpl.h 2006-05-31 14:05:14.000000000 -0400 +@@ -77,10 +77,8 @@ + { + _rep = ArrayRep::alloc(size); + +- if (!_rep) +- { +- throw NullPointer(); +- } ++ // ArrayRep::alloc() throws a bad_alloc exception if ++ // storage could not be obtained. + + InitializeRaw(Array_data, size); + } +@@ -92,10 +90,8 @@ + { + _rep = ArrayRep::alloc(size); + +- if (!_rep) +- { +- throw NullPointer(); +- } ++ // ArrayRep::alloc() throws a bad_alloc exception if ++ // storage could not be obtained. + + PEGASUS_ARRAY_T* data = Array_data; + +@@ -114,10 +110,8 @@ + { + _rep = ArrayRep::alloc(size); + +- if (!_rep) +- { +- throw NullPointer(); +- } ++ // ArrayRep::alloc() throws a bad_alloc exception if ++ // storage could not be obtained. + + CopyToRaw(Array_data, items, size); + } +@@ -176,8 +170,8 @@ + ArrayRep* rep = + ArrayRep::alloc(capacity); + +- if (!rep) +- return; ++ // ArrayRep::alloc() throws a bad_alloc exception if ++ // storage could not be obtained. + + rep->size = Array_size; + +--- pegasus/src/Pegasus/Common/Buffer.cpp.obz5053 2006-05-31 14:05:14.000000000 -0400 ++++ pegasus/src/Pegasus/Common/Buffer.cpp 2006-05-31 14:05:14.000000000 -0400 +@@ -43,16 +43,13 @@ + + static const size_t MIN_CAPACITY = 2048; + +-#ifndef PEGASUS_CHECK_FOR_OVERFLOW +-#define PEGASUS_CHECK_FOR_OVERFLOW(capacity) { if (capacity > 0x3FFFFFFF) throw PEGASUS_STD(bad_alloc)(); } +-#endif +- + static Uint32 _next_pow_2(Uint32 x) + { + if (x < MIN_CAPACITY) + return MIN_CAPACITY; + +- PEGASUS_CHECK_FOR_OVERFLOW(x); ++ // Check for potential overflow in x. ++ PEGASUS_CHECK_CAPACITY_OVERFLOW(x); + + x--; + x |= (x >> 1); +@@ -139,7 +136,8 @@ + } + else + { +- PEGASUS_CHECK_FOR_OVERFLOW(_rep->cap); ++ // Check for potential overflow. ++ PEGASUS_CHECK_CAPACITY_OVERFLOW(_rep->cap); + _rep = _reallocate(_rep, _rep->cap ? (2 * _rep->cap) : MIN_CAPACITY); + } + } +--- pegasus/src/Pegasus/Common/String.cpp.obz5053 2006-05-31 14:05:14.000000000 -0400 ++++ pegasus/src/Pegasus/Common/String.cpp 2006-05-31 14:05:14.000000000 -0400 +@@ -51,10 +51,6 @@ + #include + #endif + +-#ifndef PEGASUS_CHECK_FOR_OVERFLOW +-#define PEGASUS_CHECK_FOR_OVERFLOW(capacity) { if (capacity > 0x3FFFFFFF) throw PEGASUS_STD(bad_alloc)(); } +-#endif +- + PEGASUS_NAMESPACE_BEGIN + + //============================================================================== +@@ -170,7 +166,8 @@ + { + #ifndef PEGASUS_STRING_NO_THROW + +- PEGASUS_CHECK_FOR_OVERFLOW(x); ++ // Check for potential overflow in x ++ PEGASUS_CHECK_CAPACITY_OVERFLOW(x); + + #endif + +@@ -547,8 +544,9 @@ + inline StringRep* StringRep::alloc(size_t cap) + { + #ifndef PEGASUS_STRING_NO_THROW +- +- PEGASUS_CHECK_FOR_OVERFLOW(cap); ++ ++ // Check for potential overflow in cap ++ PEGASUS_CHECK_CAPACITY_OVERFLOW(cap); + + #endif + diff --git a/pegasus-2.5.1-obz5059.patch b/pegasus-2.5.1-obz5059.patch new file mode 100644 index 0000000..cc658b8 --- /dev/null +++ b/pegasus-2.5.1-obz5059.patch @@ -0,0 +1,11 @@ +--- pegasus/src/Pegasus/Common/XmlWriter.cpp.obz5059 2006-01-30 11:17:08.000000000 -0500 ++++ pegasus/src/Pegasus/Common/XmlWriter.cpp 2006-05-31 13:03:27.000000000 -0400 +@@ -250,7 +250,7 @@ + static const int _isSpecialChar7[] = + { + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,0, +- 0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0, ++ 0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, + }; diff --git a/pegasus-2.5.1-obz5072.patch b/pegasus-2.5.1-obz5072.patch new file mode 100644 index 0000000..067ec17 --- /dev/null +++ b/pegasus-2.5.1-obz5072.patch @@ -0,0 +1,58 @@ +--- pegasus/src/Pegasus/ProviderManager2/OOPProviderManagerRouter.cpp.obz5072 2006-05-31 12:18:40.000000000 -0400 ++++ pegasus/src/Pegasus/ProviderManager2/OOPProviderManagerRouter.cpp 2006-05-31 13:09:56.000000000 -0400 +@@ -97,18 +97,25 @@ + { + public: + OutstandingRequestEntry( +- String messageId_, ++ String originalMessageId_, + CIMRequestMessage* requestMessage_, + CIMResponseMessage*& responseMessage_, + Semaphore* responseReady_) +- : messageId(messageId_), ++ : originalMessageId(originalMessageId_), + requestMessage(requestMessage_), + responseMessage(responseMessage_), + responseReady(responseReady_) + { + } + +- String messageId; ++ /** ++ A unique value is substituted as the request messageId attribute to ++ allow responses to be definitively correllated with requests. ++ The original messageId value is stored here to avoid a race condition ++ between the processing of a response chunk and the resetting of the ++ original messageId in the request message. ++ */ ++ String originalMessageId; + CIMRequestMessage* requestMessage; + CIMResponseMessage*& responseMessage; + Semaphore* responseReady; +@@ -931,7 +938,7 @@ + i != 0; i++) + { + PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, +- String("Completing messageId \"") + i.value()->messageId + ++ String("Completing messageId \"") + i.key() + + "\" with a null response."); + i.value()->responseMessage = response; + i.value()->responseReady->signal(); +@@ -1048,7 +1055,7 @@ + // + Semaphore waitSemaphore(0); + OutstandingRequestEntry outstandingRequestEntry( +- uniqueMessageId, request, response, &waitSemaphore); ++ originalMessageId, request, response, &waitSemaphore); + + // + // Lock the Provider Agent Container while initializing the +@@ -1343,7 +1350,7 @@ + + // Put the original message ID into the response + response->messageId = +- _outstandingRequestEntry->requestMessage->messageId; ++ _outstandingRequestEntry->originalMessageId; + + // Call the response chunk callback to process the chunk + _responseChunkCallback( diff --git a/pegasus-2.5.1-obz5083.patch b/pegasus-2.5.1-obz5083.patch new file mode 100644 index 0000000..db966a1 --- /dev/null +++ b/pegasus-2.5.1-obz5083.patch @@ -0,0 +1,751 @@ +--- pegasus/src/Pegasus/Common/CIMMessage.cpp.obz5083 2006-05-31 12:18:40.000000000 -0400 ++++ pegasus/src/Pegasus/Common/CIMMessage.cpp 2006-05-31 13:13:35.000000000 -0400 +@@ -46,7 +46,7 @@ + + PEGASUS_NAMESPACE_BEGIN + +-void CIMResponseMessage::syncAttributes(CIMRequestMessage* request) ++void CIMResponseMessage::syncAttributes(const CIMRequestMessage* request) + { + // Propagate request attributes to the response, as necessary + setKey(request->getKey()); +@@ -56,7 +56,7 @@ + setCloseConnect(request->getCloseConnect()); + } + +-CIMResponseMessage* CIMGetClassRequestMessage::buildResponse() ++CIMResponseMessage* CIMGetClassRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMGetClassResponseMessage( +@@ -68,7 +68,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMGetInstanceRequestMessage::buildResponse() ++CIMResponseMessage* CIMGetInstanceRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMGetInstanceResponseMessage( +@@ -80,7 +80,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMExportIndicationRequestMessage::buildResponse() ++CIMResponseMessage* CIMExportIndicationRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMExportIndicationResponseMessage( +@@ -91,7 +91,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMDeleteClassRequestMessage::buildResponse() ++CIMResponseMessage* CIMDeleteClassRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMDeleteClassResponseMessage( +@@ -102,7 +102,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMDeleteInstanceRequestMessage::buildResponse() ++CIMResponseMessage* CIMDeleteInstanceRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMDeleteInstanceResponseMessage( +@@ -113,7 +113,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMCreateClassRequestMessage::buildResponse() ++CIMResponseMessage* CIMCreateClassRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMCreateClassResponseMessage( +@@ -124,7 +124,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMCreateInstanceRequestMessage::buildResponse() ++CIMResponseMessage* CIMCreateInstanceRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMCreateInstanceResponseMessage( +@@ -136,7 +136,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMModifyClassRequestMessage::buildResponse() ++CIMResponseMessage* CIMModifyClassRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMModifyClassResponseMessage( +@@ -147,7 +147,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMModifyInstanceRequestMessage::buildResponse() ++CIMResponseMessage* CIMModifyInstanceRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMModifyInstanceResponseMessage( +@@ -158,7 +158,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMEnumerateClassesRequestMessage::buildResponse() ++CIMResponseMessage* CIMEnumerateClassesRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMEnumerateClassesResponseMessage( +@@ -170,7 +170,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMEnumerateClassNamesRequestMessage::buildResponse() ++CIMResponseMessage* CIMEnumerateClassNamesRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMEnumerateClassNamesResponseMessage( +@@ -182,7 +182,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMEnumerateInstancesRequestMessage::buildResponse() ++CIMResponseMessage* CIMEnumerateInstancesRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMEnumerateInstancesResponseMessage( +@@ -194,7 +194,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMEnumerateInstanceNamesRequestMessage::buildResponse() ++CIMResponseMessage* CIMEnumerateInstanceNamesRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMEnumerateInstanceNamesResponseMessage( +@@ -206,7 +206,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMExecQueryRequestMessage::buildResponse() ++CIMResponseMessage* CIMExecQueryRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMExecQueryResponseMessage( +@@ -218,7 +218,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMAssociatorsRequestMessage::buildResponse() ++CIMResponseMessage* CIMAssociatorsRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMAssociatorsResponseMessage( +@@ -230,7 +230,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMAssociatorNamesRequestMessage::buildResponse() ++CIMResponseMessage* CIMAssociatorNamesRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMAssociatorNamesResponseMessage( +@@ -242,7 +242,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMReferencesRequestMessage::buildResponse() ++CIMResponseMessage* CIMReferencesRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMReferencesResponseMessage( +@@ -254,7 +254,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMReferenceNamesRequestMessage::buildResponse() ++CIMResponseMessage* CIMReferenceNamesRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMReferenceNamesResponseMessage( +@@ -266,7 +266,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMGetPropertyRequestMessage::buildResponse() ++CIMResponseMessage* CIMGetPropertyRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMGetPropertyResponseMessage( +@@ -278,7 +278,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMSetPropertyRequestMessage::buildResponse() ++CIMResponseMessage* CIMSetPropertyRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMSetPropertyResponseMessage( +@@ -289,7 +289,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMGetQualifierRequestMessage::buildResponse() ++CIMResponseMessage* CIMGetQualifierRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMGetQualifierResponseMessage( +@@ -301,7 +301,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMSetQualifierRequestMessage::buildResponse() ++CIMResponseMessage* CIMSetQualifierRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMSetQualifierResponseMessage( +@@ -312,7 +312,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMDeleteQualifierRequestMessage::buildResponse() ++CIMResponseMessage* CIMDeleteQualifierRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMDeleteQualifierResponseMessage( +@@ -323,7 +323,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMEnumerateQualifiersRequestMessage::buildResponse() ++CIMResponseMessage* CIMEnumerateQualifiersRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMEnumerateQualifiersResponseMessage( +@@ -335,7 +335,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMInvokeMethodRequestMessage::buildResponse() ++CIMResponseMessage* CIMInvokeMethodRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMInvokeMethodResponseMessage( +@@ -349,7 +349,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMProcessIndicationRequestMessage::buildResponse() ++CIMResponseMessage* CIMProcessIndicationRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMProcessIndicationResponseMessage( +@@ -360,7 +360,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMNotifyProviderRegistrationRequestMessage::buildResponse() ++CIMResponseMessage* CIMNotifyProviderRegistrationRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMNotifyProviderRegistrationResponseMessage( +@@ -371,7 +371,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMNotifyProviderTerminationRequestMessage::buildResponse() ++CIMResponseMessage* CIMNotifyProviderTerminationRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMNotifyProviderTerminationResponseMessage( +@@ -382,7 +382,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMHandleIndicationRequestMessage::buildResponse() ++CIMResponseMessage* CIMHandleIndicationRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMHandleIndicationResponseMessage( +@@ -393,7 +393,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMCreateSubscriptionRequestMessage::buildResponse() ++CIMResponseMessage* CIMCreateSubscriptionRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMCreateSubscriptionResponseMessage( +@@ -404,7 +404,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMModifySubscriptionRequestMessage::buildResponse() ++CIMResponseMessage* CIMModifySubscriptionRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMModifySubscriptionResponseMessage( +@@ -415,7 +415,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMDeleteSubscriptionRequestMessage::buildResponse() ++CIMResponseMessage* CIMDeleteSubscriptionRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMDeleteSubscriptionResponseMessage( +@@ -427,7 +427,7 @@ + } + + CIMResponseMessage* +- CIMSubscriptionInitCompleteRequestMessage::buildResponse() ++ CIMSubscriptionInitCompleteRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMSubscriptionInitCompleteResponseMessage( +@@ -438,7 +438,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMDisableModuleRequestMessage::buildResponse() ++CIMResponseMessage* CIMDisableModuleRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMDisableModuleResponseMessage( +@@ -450,7 +450,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMEnableModuleRequestMessage::buildResponse() ++CIMResponseMessage* CIMEnableModuleRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMEnableModuleResponseMessage( +@@ -462,7 +462,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMNotifyProviderEnableRequestMessage::buildResponse() ++CIMResponseMessage* CIMNotifyProviderEnableRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMNotifyProviderEnableResponseMessage( +@@ -484,7 +484,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMStopAllProvidersRequestMessage::buildResponse() ++CIMResponseMessage* CIMStopAllProvidersRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMStopAllProvidersResponseMessage( +@@ -495,7 +495,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMInitializeProviderRequestMessage::buildResponse() ++CIMResponseMessage* CIMInitializeProviderRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMInitializeProviderResponseMessage( +@@ -506,7 +506,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMInitializeProviderAgentRequestMessage::buildResponse() ++CIMResponseMessage* CIMInitializeProviderAgentRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMInitializeProviderAgentResponseMessage( +@@ -517,7 +517,7 @@ + return response.release(); + } + +-CIMResponseMessage* CIMNotifyConfigChangeRequestMessage::buildResponse() ++CIMResponseMessage* CIMNotifyConfigChangeRequestMessage::buildResponse() const + { + AutoPtr response( + new CIMNotifyConfigChangeResponseMessage( +--- pegasus/src/Pegasus/Common/CIMMessage.h.obz5083 2006-05-31 12:18:40.000000000 -0400 ++++ pegasus/src/Pegasus/Common/CIMMessage.h 2006-05-31 13:13:35.000000000 -0400 +@@ -124,7 +124,7 @@ + CIMRequestMessage( + Uint32 type_, const String& messageId_, const QueueIdStack& queueIds_); + +- virtual CIMResponseMessage* buildResponse() = 0; ++ virtual CIMResponseMessage* buildResponse() const = 0; + + #ifdef PEGASUS_DEBUG + virtual void print(PEGASUS_STD(ostream)& os, Boolean printHeader) const +@@ -160,7 +160,7 @@ + const CIMException& cimException_, + const QueueIdStack& queueIds_); + +- void syncAttributes(CIMRequestMessage* request); ++ void syncAttributes(const CIMRequestMessage* request); + + QueueIdStack queueIds; + CIMException cimException; +@@ -228,7 +228,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + Boolean localOnly; + Boolean includeQualifiers; +@@ -266,7 +266,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMObjectPath instanceName; + Boolean localOnly; +@@ -297,7 +297,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + String destinationPath; + CIMInstance indicationInstance; +@@ -325,7 +325,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + String authType; + String userName; +@@ -351,7 +351,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMObjectPath instanceName; + String authType; +@@ -379,7 +379,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMClass newClass; + String authType; +@@ -406,7 +406,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMInstance newInstance; + String authType; +@@ -434,7 +434,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMClass modifiedClass; + String authType; +@@ -465,7 +465,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMInstance modifiedInstance; + Boolean includeQualifiers; +@@ -502,7 +502,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + Boolean deepInheritance; + Boolean localOnly; +@@ -534,7 +534,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + Boolean deepInheritance; + String authType; +@@ -570,7 +570,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + Boolean deepInheritance; + Boolean localOnly; +@@ -623,7 +623,7 @@ + } + #endif + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + String authType; + String userName; +@@ -652,7 +652,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + String queryLanguage; + String query; +@@ -695,7 +695,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMObjectPath objectName; + CIMName assocClass; +@@ -738,7 +738,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMObjectPath objectName; + CIMName assocClass; +@@ -780,7 +780,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMObjectPath objectName; + CIMName resultClass; +@@ -817,7 +817,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMObjectPath objectName; + CIMName resultClass; +@@ -848,7 +848,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMObjectPath instanceName; + CIMName propertyName; +@@ -880,7 +880,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMObjectPath instanceName; + CIMName propertyName; +@@ -910,7 +910,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMName qualifierName; + String authType; +@@ -938,7 +938,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMQualifierDecl qualifierDeclaration; + String authType; +@@ -966,7 +966,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMName qualifierName; + String authType; +@@ -992,7 +992,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + String authType; + String userName; +@@ -1023,7 +1023,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMObjectPath instanceName; + CIMName methodName; +@@ -1052,7 +1052,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMNamespaceName nameSpace; + CIMInstance indicationInstance; +@@ -1090,7 +1090,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMName className; + Array newNamespaces; +@@ -1115,7 +1115,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + Array providers; + }; +@@ -1144,7 +1144,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMNamespaceName nameSpace; + CIMInstance handlerInstance; +@@ -1184,7 +1184,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMNamespaceName nameSpace; + CIMInstance subscriptionInstance; +@@ -1226,7 +1226,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMNamespaceName nameSpace; + CIMInstance subscriptionInstance; +@@ -1262,7 +1262,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMNamespaceName nameSpace; + CIMInstance subscriptionInstance; +@@ -1286,7 +1286,7 @@ + { + } + +- virtual CIMResponseMessage * buildResponse (); ++ virtual CIMResponseMessage* buildResponse() const; + }; + + class PEGASUS_COMMON_LINKAGE CIMDisableModuleRequestMessage +@@ -1315,7 +1315,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMInstance providerModule; + Array providers; +@@ -1345,7 +1345,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + CIMInstance providerModule; + String authType; +@@ -1368,7 +1368,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + Array capInstances; + }; +@@ -1411,7 +1411,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + }; + + class PEGASUS_COMMON_LINKAGE CIMInitializeProviderRequestMessage +@@ -1428,7 +1428,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + }; + + // Used to pass initialization data to an Out-of-Process Provider Agent process +@@ -1454,7 +1454,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + String pegasusHome; + Array > configProperties; +@@ -1482,7 +1482,7 @@ + { + } + +- virtual CIMResponseMessage* buildResponse(); ++ virtual CIMResponseMessage* buildResponse() const; + + String propertyName; + String newPropertyValue; diff --git a/tog-pegasus.spec b/tog-pegasus.spec index d448611..882a8ce 100644 --- a/tog-pegasus.spec +++ b/tog-pegasus.spec @@ -31,7 +31,7 @@ %define pegasus_uid 66 Version: 2.5.1 -Release: 4%{?LINUX_VERSION:.%{LINUX_VERSION}} +Release: 6%{?LINUX_VERSION:.%{LINUX_VERSION}} Epoch: 2 # Summary: OpenPegasus WBEM Services for Linux