diff --git a/pegasus-2.7.1-bz454590.patch b/pegasus-2.7.1-bz454590.patch index f1f19ac..a73951e 100644 --- a/pegasus-2.7.1-bz454590.patch +++ b/pegasus-2.7.1-bz454590.patch @@ -1,7 +1,7 @@ -diff -up pegasus/src/Providers/TestProviders/CMPI/TestFail_1/tests/TestCMPI_Fail_1.cpp_old pegasus/src/Providers/TestProviders/CMPI/TestFail_1/tests/TestCMPI_Fail_1.cpp ---- pegasus/src/Providers/TestProviders/CMPI/TestFail_1/tests/TestCMPI_Fail_1.cpp_old 2008-07-15 14:19:20.000000000 +0200 -+++ pegasus/src/Providers/TestProviders/CMPI/TestFail_1/tests/TestCMPI_Fail_1.cpp 2008-07-15 14:21:54.000000000 +0200 -@@ -49,13 +49,17 @@ PEGASUS_USING_STD; +diff -up pegasus/src/Providers/TestProviders/CMPI/TestFail_1/tests/TestCMPI_Fail_1.cpp.bz454590 pegasus/src/Providers/TestProviders/CMPI/TestFail_1/tests/TestCMPI_Fail_1.cpp +--- pegasus/src/Providers/TestProviders/CMPI/TestFail_1/tests/TestCMPI_Fail_1.cpp.bz454590 2007-09-14 20:26:55.000000000 +0200 ++++ pegasus/src/Providers/TestProviders/CMPI/TestFail_1/tests/TestCMPI_Fail_1.cpp 2008-07-16 15:52:49.000000000 +0200 +@@ -49,13 +49,16 @@ PEGASUS_USING_STD; CIMNamespaceName providerNamespace; const CIMName CLASSNAME = CIMName ("TestCMPI_Fail_1"); @@ -21,24 +21,23 @@ diff -up pegasus/src/Providers/TestProviders/CMPI/TestFail_1/tests/TestCMPI_Fail + " returned an error: TestCMPIFail_1Provider_Create_MethodMI"; + +const String CMPI_TESTFAIL_ASSOC_ERROR = "CIM_ERR_FAILED: Error initializing" -+ " CMPI MI TestCMPIFail_1Provider, the following MI factory function(s)" -+ ++ " CMPI MI TestCMPIFail_1Provider, the following MI factory function(s)"; const String RCMPI_ERROR = "CIM_ERR_FAILED: ProviderInitFailure:" " Error initializing the API's _CreateMI"; -@@ -78,7 +82,7 @@ void test01 (CIMClient & client) +@@ -78,7 +81,36 @@ void test01 (CIMClient & client) } catch (const CIMException &e) { - if (e.getMessage() != CMPI_TESTFAIL_ERROR + if (e.getMessage() != CMPI_TESTFAIL_INST_ERROR - && e.getMessage() != RCMPI_ERROR) - { - throw e; -@@ -86,12 +90,66 @@ void test01 (CIMClient & client) - } - } - ++ && e.getMessage() != RCMPI_ERROR) ++ { ++ throw e; ++ } ++ } ++} ++ +void test02 (CIMClient & client) +{ + try @@ -61,13 +60,13 @@ diff -up pegasus/src/Providers/TestProviders/CMPI/TestFail_1/tests/TestCMPI_Fail + catch (const CIMException &e) + { + if (e.getMessage() != CMPI_TESTFAIL_METH_ERROR -+ && e.getMessage() != RCMPI_ERROR) -+ { -+ throw e; -+ } -+ } -+} -+ + && e.getMessage() != RCMPI_ERROR) + { + throw e; +@@ -86,12 +118,37 @@ void test01 (CIMClient & client) + } + } + +void test03 (CIMClient & client) +{ + try @@ -102,9 +101,216 @@ diff -up pegasus/src/Providers/TestProviders/CMPI/TestFail_1/tests/TestCMPI_Fail } catch (Exception & e) { -diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp ---- pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old 2008-07-15 13:17:05.000000000 +0200 -+++ pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp 2008-07-15 14:10:03.000000000 +0200 +diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.cpp.bz454590 pegasus/src/Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.cpp +--- pegasus/src/Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.cpp.bz454590 2007-12-19 15:04:39.000000000 +0100 ++++ pegasus/src/Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.cpp 2008-07-16 15:12:16.000000000 +0200 +@@ -122,8 +122,8 @@ Sint32 CMPILocalProviderManager::_provid + String location = *(parms->location); + + CMPIProvider *pr = 0; +- CMPIProvider::OpProviderHolder * ph = +- reinterpret_cast < CMPIProvider::OpProviderHolder * >(ret); ++ OpProviderHolder * ph = ++ reinterpret_cast < OpProviderHolder * >(ret); + + pr = _lookupProvider (providerName); + +@@ -176,7 +176,7 @@ Sint32 CMPILocalProviderManager::_provid + + AutoMutex lock (_providerTableMutex); + // The provider table must be locked before unloading. +- _providers.remove (pr->_name); ++ _providers.remove (pr->getNameWithType()); + _unloadProvider (pr); + delete pr; + +@@ -184,7 +184,7 @@ Sint32 CMPILocalProviderManager::_provid + else + { + // No need to have a memory leak. +- _providers.remove(pr->_name); ++ _providers.remove(pr->getNameWithType()); + delete pr; + } + break; +@@ -375,14 +375,14 @@ Sint32 CMPILocalProviderManager::_provid + continue; + } + +- if (provider->_quantum == quantum) ++ if (provider->getQuantum() == quantum) + { + continue; + } + +- provider->_quantum = quantum; ++ provider->setQuantum(quantum); + +- if (provider->_current_operations.get ()) ++ if (provider->getCurrentOperations()) + { + PEG_TRACE_STRING( + TRC_PROVIDERMANAGER, +@@ -434,7 +434,7 @@ Sint32 CMPILocalProviderManager::_provid + { + // lock the provider mutex + +- AutoMutex pr_lock (provider->_statusMutex); ++ AutoMutex pr_lock (provider->getStatusMutex()); + + if (provider->tryTerminate () == false) + { +@@ -448,10 +448,10 @@ Sint32 CMPILocalProviderManager::_provid + continue; + } + +- PEGASUS_ASSERT (provider->_module != 0); ++ PEGASUS_ASSERT (provider->getModule() != 0); + + // unload provider module +- provider->_module->unloadModule (); ++ provider->getModule()->unloadModule (); + Logger::put (Logger::STANDARD_LOG, + System::CIMSERVER, + Logger::TRACE, +@@ -470,7 +470,7 @@ Sint32 CMPILocalProviderManager::_provid + Tracer::LEVEL4, + "Destroying CMPIProvider's CIMOM Handle " + + provider->getName()); +- delete provider->_cimom_handle; ++ delete provider->getCIMOMHandle(); + + // set provider status to UNINITIALIZED + provider->reset (); +@@ -598,10 +598,10 @@ void CMPILocalProviderManager::cleanupTh + + } + +-CMPIProvider::OpProviderHolder CMPILocalProviderManager:: ++OpProviderHolder CMPILocalProviderManager:: + getRemoteProvider (const String & location, const String & providerName) + { +- CMPIProvider::OpProviderHolder ph; ++ OpProviderHolder ph; + CTRL_STRINGS + strings; + Sint32 +@@ -649,10 +649,10 @@ CMPIProvider::OpProviderHolder CMPILocal + return ph; + } + +-CMPIProvider::OpProviderHolder CMPILocalProviderManager:: ++OpProviderHolder CMPILocalProviderManager:: + getProvider (const String & fileName, const String & providerName) + { +- CMPIProvider::OpProviderHolder ph; ++ OpProviderHolder ph; + CTRL_STRINGS strings; + Sint32 ccode; + +@@ -887,9 +887,9 @@ CMPIProvider *CMPILocalProviderManager:: + String exceptionMsg = moduleFileName; + { + // lock the provider status mutex +- AutoMutex lock (provider->_statusMutex); ++ AutoMutex lock (provider->getStatusMutex()); + +- if (provider->_status == CMPIProvider::INITIALIZED) ++ if (provider->getStatus() == CMPIProvider::INITIALIZED) + { + PEG_METHOD_EXIT(); + // Initialization is already complete +@@ -904,7 +904,7 @@ CMPIProvider *CMPILocalProviderManager:: + // load the provider + try + { +- base = module->load (provider->_name); ++ base = module->load (provider->getNameWithType()); + moduleLoaded = true; + } + catch (const Exception &e) +@@ -938,11 +938,11 @@ CMPIProvider *CMPILocalProviderManager:: + + CIMOMHandle *cimomHandle = new CIMOMHandle (); + provider->set (module, base, cimomHandle); +- provider->_quantum = 0; ++ provider->setQuantum(0); + + try + { +- provider->initialize (*(provider->_cimom_handle)); ++ provider->initialize (*(provider->getCIMOMHandle())); + } + catch (const Exception &e) + { +@@ -981,12 +981,12 @@ CMPIProvider *CMPILocalProviderManager:: + } + + // delete the cimom handle +- delete provider->_cimom_handle; ++ delete provider->getCIMOMHandle(); + // set provider status to UNINITIALIZED + provider->reset (); + + AutoMutex lock (_providerTableMutex); +- _providers.remove (provider->_name); ++ _providers.remove (provider->getNameWithType()); + delete provider; + + PEG_METHOD_EXIT (); +@@ -1013,7 +1013,7 @@ void CMPILocalProviderManager::_unloadPr + Tracer::LEVEL4, + "Unloading Provider " + provider->getName()); + +- if (provider->_current_operations.get ()) ++ if (provider->getCurrentOperations()) + { + PEG_TRACE_STRING( + TRC_PROVIDERMANAGER, +@@ -1030,7 +1030,7 @@ void CMPILocalProviderManager::_unloadPr + + + // lock the provider mutex +- AutoMutex pr_lock (provider->_statusMutex); ++ AutoMutex pr_lock (provider->getStatusMutex()); + + try + { +@@ -1052,11 +1052,11 @@ void CMPILocalProviderManager::_unloadPr + "Destroying CMPIProvider's CIMOM Handle " + + provider->getName()); + +- delete provider->_cimom_handle; +- PEGASUS_ASSERT (provider->_module != 0); ++ delete provider->getCIMOMHandle(); ++ PEGASUS_ASSERT (provider->getModule() != 0); + + // unload provider module +- provider->_module->unloadModule (); ++ provider->getModule()->unloadModule (); + Logger::put (Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, + "CMPILocalProviderManager::_provider_crtl - Unload provider $0", + provider->getName ()); +diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.h.bz454590 pegasus/src/Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.h +--- pegasus/src/Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.h.bz454590 2007-08-13 08:25:48.000000000 +0200 ++++ pegasus/src/Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.h 2008-07-16 15:12:16.000000000 +0200 +@@ -53,11 +53,11 @@ public: + virtual ~CMPILocalProviderManager(); + + public: +- CMPIProvider::OpProviderHolder getProvider( ++ OpProviderHolder getProvider( + const String & fileName, + const String & providerName); + +- CMPIProvider::OpProviderHolder getRemoteProvider( ++ OpProviderHolder getRemoteProvider( + const String & fileName, + const String & providerName); + +diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp.bz454590 pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp +--- pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp.bz454590 2008-02-28 12:46:29.000000000 +0100 ++++ pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp 2008-07-16 15:14:18.000000000 +0200 @@ -429,7 +429,7 @@ Message * CMPIProviderManager::handleGet request->instanceName.getKeyBindings()); @@ -180,7 +386,7 @@ diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old p - rc = pr.miVector.instMI->ft->enumInstances( - pr.miVector.instMI, -+ rc = pr.getInstMI()->ft->enumerateInstances( ++ rc = pr.getInstMI()->ft->enumInstances( + pr.getInstMI(), &eCtx, &eRes, @@ -211,7 +417,7 @@ diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old p - rc = pr.miVector.instMI->ft->enumInstanceNames( - pr.miVector.instMI,&eCtx,&eRes,&eRef); -+ rc = pr.getInstMI()->ft->enumerateInstanceNames( ++ rc = pr.getInstMI()->ft->enumInstanceNames( + pr.getInstMI(), + &eCtx, + &eRes, @@ -688,15 +894,16 @@ diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old p CHARS(eSelx->classNames[0].getClassName().getString(). getCString()),&eRef,prec==NULL); } -@@ -2718,6 +2769,7 @@ Message * CMPIProviderManager::handleDis +@@ -2717,7 +2768,7 @@ Message * CMPIProviderManager::handleDis + { try { - CMPIProvider::OpProviderHolder ph = +- CMPIProvider::OpProviderHolder ph = + OpProviderHolder ph = providerManager.getProvider( physicalName, providerName); -@@ -2904,7 +2956,7 @@ Message * CMPIProviderManager::handleSub +@@ -2904,7 +2955,7 @@ Message * CMPIProviderManager::handleSub // // Get cached or load new provider module // @@ -705,7 +912,7 @@ diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old p if ((const char*)info) { ph = providerManager.getRemoteProvider -@@ -3013,7 +3065,7 @@ Message * CMPIProviderManager::handleGet +@@ -3013,7 +3064,7 @@ Message * CMPIProviderManager::handleGet request->instanceName.getKeyBindings()); Boolean remote=false; @@ -714,7 +921,7 @@ diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old p // resolve provider name ProviderIdContainer pidc = -@@ -3045,7 +3097,7 @@ Message * CMPIProviderManager::handleGet +@@ -3045,7 +3096,7 @@ Message * CMPIProviderManager::handleGet #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT AutoPtr tmpNormalizerContext( @@ -723,7 +930,7 @@ diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old p request->operationContext.insert( NormalizerContextContainer(tmpNormalizerContext)); #endif -@@ -3058,8 +3110,8 @@ Message * CMPIProviderManager::handleGet +@@ -3058,8 +3109,8 @@ Message * CMPIProviderManager::handleGet CMPIStatus rc={CMPI_RC_OK,NULL}; CMPI_ContextOnStack eCtx(context); CMPI_ObjectPathOnStack eRef(objectPath); @@ -734,7 +941,7 @@ diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old p // For the getInstance provider call, use the property list that we // created containing the single property from the getProperty call. -@@ -3084,8 +3136,11 @@ Message * CMPIProviderManager::handleGet +@@ -3084,8 +3135,11 @@ Message * CMPIProviderManager::handleGet { StatProviderTimeMeasurement providerTime(response); @@ -748,7 +955,7 @@ diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old p (const char **)props.getList()); } -@@ -3222,7 +3277,7 @@ Message * CMPIProviderManager::handleSet +@@ -3222,7 +3276,7 @@ Message * CMPIProviderManager::handleSet request->instanceName.getKeyBindings()); Boolean remote=false; @@ -757,7 +964,7 @@ diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old p // resolve provider name ProviderIdContainer pidc = -@@ -3260,9 +3315,9 @@ Message * CMPIProviderManager::handleSet +@@ -3260,9 +3314,9 @@ Message * CMPIProviderManager::handleSet CMPIStatus rc={CMPI_RC_OK,NULL}; CMPI_ContextOnStack eCtx(context); CMPI_ObjectPathOnStack eRef(objectPath); @@ -769,7 +976,7 @@ diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old p CMPIPropertyList props(localPropertyList); -@@ -3284,8 +3339,12 @@ Message * CMPIProviderManager::handleSet +@@ -3284,8 +3338,12 @@ Message * CMPIProviderManager::handleSet { StatProviderTimeMeasurement providerTime(response); @@ -784,7 +991,7 @@ diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old p (const char **)props.getList()); } -@@ -3400,7 +3459,7 @@ ProviderName CMPIProviderManager::_resol +@@ -3400,7 +3458,7 @@ ProviderName CMPIProviderManager::_resol void CMPIProviderManager::_callEnableIndications (CIMInstance & req_provider, PEGASUS_INDICATION_CALLBACK_T _indicationCallback, @@ -793,7 +1000,7 @@ diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old p const char* remoteInfo) { PEG_METHOD_ENTER( -@@ -3432,7 +3491,7 @@ void CMPIProviderManager::_callEnableInd +@@ -3432,7 +3490,7 @@ void CMPIProviderManager::_callEnableInd // // Versions prior to 86 did not include enableIndications routine // @@ -802,7 +1009,7 @@ diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old p { OperationContext context; #ifdef PEGASUS_ZOS_THREADLEVEL_SECURITY -@@ -3446,7 +3505,7 @@ void CMPIProviderManager::_callEnableInd +@@ -3446,7 +3504,7 @@ void CMPIProviderManager::_callEnableInd CMPIStatus rc={CMPI_RC_OK,NULL}; CMPI_ContextOnStack eCtx(context); @@ -811,7 +1018,7 @@ diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old p // Add RemoteInformation -V 5245 if (remoteInfo) -@@ -3472,7 +3531,7 @@ void CMPIProviderManager::_callEnableInd +@@ -3472,7 +3530,7 @@ void CMPIProviderManager::_callEnableInd // breaking existing CMPI Indication providers. This is ok since // there really isn't a user to which the problem should be // reported. @@ -820,7 +1027,7 @@ diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old p } else { -@@ -3515,7 +3574,7 @@ void CMPIProviderManager::_callEnableInd +@@ -3515,7 +3573,7 @@ void CMPIProviderManager::_callEnableInd } void CMPIProviderManager::_callDisableIndications @@ -829,7 +1036,7 @@ diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old p { PEG_METHOD_ENTER( TRC_PROVIDERMANAGER, -@@ -3539,7 +3598,7 @@ void CMPIProviderManager::_callDisableIn +@@ -3539,7 +3597,7 @@ void CMPIProviderManager::_callDisableIn // // Versions prior to 86 did not include disableIndications routine // @@ -838,7 +1045,7 @@ diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old p { OperationContext context; CMPIStatus rc={CMPI_RC_OK,NULL}; -@@ -3550,7 +3609,7 @@ void CMPIProviderManager::_callDisableIn +@@ -3550,7 +3608,7 @@ void CMPIProviderManager::_callDisableIn eCtx.ft->addEntry(&eCtx,"CMPIRRemoteInfo", (CMPIValue*)(const char*)remoteInfo,CMPI_chars); } @@ -847,7 +1054,7 @@ diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old p PEG_TRACE_STRING( TRC_PROVIDERMANAGER, -@@ -3566,8 +3625,8 @@ void CMPIProviderManager::_callDisableIn +@@ -3566,8 +3624,8 @@ void CMPIProviderManager::_callDisableIn // here. This will prevent us from breaking existing CMPI // Indication providers. This is ok since there really isn't a // user to which the problem should be reported. @@ -858,449 +1065,9 @@ diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp_old p &eCtx); pr.unprotect(); -diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.h_old pegasus/src/Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.h ---- pegasus/src/Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.h_old 2008-07-15 12:51:47.000000000 +0200 -+++ pegasus/src/Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.h 2008-07-15 12:52:33.000000000 +0200 -@@ -53,11 +53,11 @@ public: - virtual ~CMPILocalProviderManager(); - - public: -- CMPIProvider::OpProviderHolder getProvider( -+ OpProviderHolder getProvider( - const String & fileName, - const String & providerName); - -- CMPIProvider::OpProviderHolder getRemoteProvider( -+ OpProviderHolder getRemoteProvider( - const String & fileName, - const String & providerName); - -diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.cpp_old pegasus/src/Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.cpp ---- pegasus/src/Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.cpp_old 2008-07-15 12:21:21.000000000 +0200 -+++ pegasus/src/Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.cpp 2008-07-15 12:51:28.000000000 +0200 -@@ -122,8 +122,8 @@ Sint32 CMPILocalProviderManager::_provid - String location = *(parms->location); - - CMPIProvider *pr = 0; -- CMPIProvider::OpProviderHolder * ph = -- reinterpret_cast < CMPIProvider::OpProviderHolder * >(ret); -+ OpProviderHolder * ph = -+ reinterpret_cast < OpProviderHolder * >(ret); - - pr = _lookupProvider (providerName); - -@@ -176,7 +176,7 @@ Sint32 CMPILocalProviderManager::_provid - - AutoMutex lock (_providerTableMutex); - // The provider table must be locked before unloading. -- _providers.remove (pr->_name); -+ _providers.remove (pr->getNameWithType()); - _unloadProvider (pr); - delete pr; - -@@ -184,7 +184,7 @@ Sint32 CMPILocalProviderManager::_provid - else - { - // No need to have a memory leak. -- _providers.remove(pr->_name); -+ _providers.remove(pr->getNameWithType()); - delete pr; - } - break; -@@ -375,14 +375,14 @@ Sint32 CMPILocalProviderManager::_provid - continue; - } - -- if (provider->_quantum == quantum) -+ if (provider->getQuantum() == quantum) - { - continue; - } - -- provider->_quantum = quantum; -+ provider->setQuantum(quantum); - -- if (provider->_current_operations.get ()) -+ if (provider->getCurrentOperations()) - { - PEG_TRACE_STRING( - TRC_PROVIDERMANAGER, -@@ -434,7 +434,7 @@ Sint32 CMPILocalProviderManager::_provid - { - // lock the provider mutex - -- AutoMutex pr_lock (provider->_statusMutex); -+ AutoMutex pr_lock (provider->getStatusMutex()); - - if (provider->tryTerminate () == false) - { -@@ -448,10 +448,10 @@ Sint32 CMPILocalProviderManager::_provid - continue; - } - -- PEGASUS_ASSERT (provider->_module != 0); -+ PEGASUS_ASSERT (provider->getModule() != 0); - - // unload provider module -- provider->_module->unloadModule (); -+ provider->getModule()->unloadModule (); - Logger::put (Logger::STANDARD_LOG, - System::CIMSERVER, - Logger::TRACE, -@@ -470,7 +470,7 @@ Sint32 CMPILocalProviderManager::_provid - Tracer::LEVEL4, - "Destroying CMPIProvider's CIMOM Handle " - + provider->getName()); -- delete provider->_cimom_handle; -+ delete provider->getCIMOMHandle(); - - // set provider status to UNINITIALIZED - provider->reset (); -@@ -598,10 +598,10 @@ void CMPILocalProviderManager::cleanupTh - - } - --CMPIProvider::OpProviderHolder CMPILocalProviderManager:: -++OpProviderHolder CMPILocalProviderManager:: - getRemoteProvider (const String & location, const String & providerName) - { -- CMPIProvider::OpProviderHolder ph; -+ OpProviderHolder ph; - CTRL_STRINGS - strings; - Sint32 -@@ -649,10 +649,10 @@ CMPIProvider::OpProviderHolder CMPILocal - return ph; - } - --CMPIProvider::OpProviderHolder CMPILocalProviderManager:: -+OpProviderHolder CMPILocalProviderManager:: - getProvider (const String & fileName, const String & providerName) - { -- CMPIProvider::OpProviderHolder ph; -+ OpProviderHolder ph; - CTRL_STRINGS strings; - Sint32 ccode; - -@@ -887,9 +887,9 @@ CMPIProvider *CMPILocalProviderManager:: - String exceptionMsg = moduleFileName; - { - // lock the provider status mutex -- AutoMutex lock (provider->_statusMutex); -+ AutoMutex lock (provider->getStatusMutex()); - -- if (provider->_status == CMPIProvider::INITIALIZED) -+ if (provider->getStatus() == CMPIProvider::INITIALIZED) - { - PEG_METHOD_EXIT(); - // Initialization is already complete -@@ -904,7 +904,7 @@ CMPIProvider *CMPILocalProviderManager:: - // load the provider - try - { -- base = module->load (provider->_name); -+ base = module->load (provider->getNameWithType()); - moduleLoaded = true; - } - catch (const Exception &e) -@@ -938,11 +938,11 @@ CMPIProvider *CMPILocalProviderManager:: - - CIMOMHandle *cimomHandle = new CIMOMHandle (); - provider->set (module, base, cimomHandle); -- provider->_quantum = 0; -+ provider->setQuantum(0); - - try - { -- provider->initialize (*(provider->_cimom_handle)); -+ provider->initialize (*(provider->getCIMOMHandle())); - } - catch (const Exception &e) - { -@@ -981,12 +981,12 @@ CMPIProvider *CMPILocalProviderManager:: - } - - // delete the cimom handle -- delete provider->_cimom_handle; -+ delete provider->getCIMOMHandle(); - // set provider status to UNINITIALIZED - provider->reset (); - - AutoMutex lock (_providerTableMutex); -- _providers.remove (provider->_name); -+ _providers.remove (provider->getNameWithType()); - delete provider; - - PEG_METHOD_EXIT (); -@@ -1013,7 +1013,7 @@ void CMPILocalProviderManager::_unloadPr - Tracer::LEVEL4, - "Unloading Provider " + provider->getName()); - -- if (provider->_current_operations.get ()) -+ if (provider->getCurrentOperations()) - { - PEG_TRACE_STRING( - TRC_PROVIDERMANAGER, -@@ -1030,7 +1030,7 @@ void CMPILocalProviderManager::_unloadPr - - - // lock the provider mutex -- AutoMutex pr_lock (provider->_statusMutex); -+ AutoMutex pr_lock (provider->getStatusMutex()); - - try - { -@@ -1052,11 +1052,11 @@ void CMPILocalProviderManager::_unloadPr - "Destroying CMPIProvider's CIMOM Handle " + - provider->getName()); - -- delete provider->_cimom_handle; -- PEGASUS_ASSERT (provider->_module != 0); -+ delete provider->getCIMOMHandle(); -+ PEGASUS_ASSERT (provider->getModule() != 0); - - // unload provider module -- provider->_module->unloadModule (); -+ provider->getModule()->unloadModule (); - Logger::put (Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, - "CMPILocalProviderManager::_provider_crtl - Unload provider $0", - provider->getName ()); -diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProvider.h_old pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProvider.h ---- pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProvider.h_old 2008-07-15 13:07:34.000000000 +0200 -+++ pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProvider.h 2008-07-15 13:16:47.000000000 +0200 -@@ -178,6 +178,11 @@ public: - - // typedef CMPIProviderFacade Base; - -+ CMPIProvider( -+ const String & name, -+ CMPIProviderModule *module, -+ ProviderVector *mv); -+ - virtual ~CMPIProvider(); - - virtual void initialize(CIMOMHandle & cimom); -@@ -192,6 +197,7 @@ public: - - Status getStatus(); - String getName() const; -+ String getNameWithType() const; - - void reset(); - -@@ -312,20 +318,39 @@ public: - */ - CIMInstance getProviderInstance (); - -+ void incCurrentOperations(); -+ void decCurrentOperations(); -+ int getCurrentOperations(); -+ -+ CIMOMHandle *getCIMOMHandle(); -+ CMPI_Broker *getBroker(); -+ -+ CMPIInstanceMI *getInstMI(); -+ CMPIMethodMI *getMethMI(); -+ CMPIAssociationMI *getAssocMI(); -+ CMPIPropertyMI *getPropMI(); -+ CMPIIndicationMI *getIndMI(); -+ -+ CMPIProviderModule *getModule(); -+ Uint32 getQuantum(); -+ void setQuantum(Uint32 quantum); -+ Mutex &getStatusMutex(); -+ -+ void set( -+ CMPIProviderModule *&module, -+ ProviderVector base, -+ CIMOMHandle *&cimomHandle); -+ - protected: - String _location; - Status _status; - CMPIProviderModule *_module; -- ProviderVector miVector; -- CMPI_Broker broker; -+ ProviderVector _miVector; -+ CMPI_Broker _broker; - CMPIrc unloadStatus; - - private: - virtual void _terminate(Boolean term); -- CMPIProvider( -- const String & name, -- CMPIProviderModule *module, -- ProviderVector *mv); - - static void initialize( - CIMOMHandle & cimom, -@@ -341,15 +366,7 @@ private: - */ - void waitUntilThreadsDone(); - -- void set( -- CMPIProviderModule *&module, -- ProviderVector base, -- CIMOMHandle *&cimomHandle); -- -- friend class CMPILocalProviderManager; -- friend class CMPIProviderManager; - class OpProviderHolder; -- friend class OpProviderHolder; - CIMOMHandle *_cimom_handle; - String _name; - AtomicInt _no_unload; -@@ -396,7 +413,7 @@ private: - generated the indication accepted a matching subscription. - */ - CIMInstance _providerInstance; --//}; -+}; - - - // -@@ -404,67 +421,66 @@ private: - // for a CMPIProvider so it won't be unloaded during operations. - // - -- class OpProviderHolder -+class OpProviderHolder -+{ -+private: -+ CMPIProvider* _provider; -+public: -+ OpProviderHolder(): _provider( NULL ) - { -- private: -- CMPIProvider* _provider; -- -- public: -- OpProviderHolder(): _provider( NULL ) -- { -- } -- OpProviderHolder( const OpProviderHolder& p ): _provider( NULL ) -- { -- SetProvider( p._provider ); -- } -- OpProviderHolder( CMPIProvider* p ): _provider( NULL ) -- { -- SetProvider( p ); -- } -- ~OpProviderHolder() -- { -- UnSetProvider(); -- } -- CMPIProvider& GetProvider() -- { -- return(*_provider); -- } -- -- OpProviderHolder& operator=( const OpProviderHolder& x ) -+ } -+ OpProviderHolder( const OpProviderHolder& p ): _provider( NULL ) -+ { -+ SetProvider( p._provider ); -+ } -+ OpProviderHolder( CMPIProvider* p ): _provider( NULL ) -+ { -+ SetProvider( p ); -+ } -+ ~OpProviderHolder() -+ { -+ UnSetProvider(); -+ } -+ CMPIProvider& GetProvider() -+ { -+ return(*_provider); -+ } -+ OpProviderHolder& operator=( const OpProviderHolder& x ) -+ { -+ if (this == &x) - { -- if (this == &x) -- return(*this); -- SetProvider( x._provider ); - return(*this); - } -+ SetProvider( x._provider ); -+ return(*this); -+ } - -- void SetProvider( CMPIProvider* p ) -+ void SetProvider( CMPIProvider* p ) -+ { -+ PEG_METHOD_ENTER( -+ TRC_CMPIPROVIDERINTERFACE, -+ "OpProviderHolder::SetProvider()"); -+ UnSetProvider(); -+ if (p) - { -- PEG_METHOD_ENTER( -- TRC_CMPIPROVIDERINTERFACE, -- "OpProviderHolder::SetProvider()"); -- UnSetProvider(); -- if (p) -- { -- _provider = p; -- _provider->_current_operations++; -- } -- PEG_METHOD_EXIT(); -+ _provider = p; -+ _provider->incCurrentOperations(); - } -+ PEG_METHOD_EXIT(); -+ } - -- void UnSetProvider() -+ void UnSetProvider() -+ { -+ PEG_METHOD_ENTER( -+ TRC_CMPIPROVIDERINTERFACE, -+ "OpProviderHolder::UnSetProvider()"); -+ if (_provider) - { -- PEG_METHOD_ENTER( -- TRC_CMPIPROVIDERINTERFACE, -- "OpProviderHolder::UnSetProvider()"); -- if (_provider) -- { -- _provider->_current_operations--; -- _provider = NULL; -- } -- PEG_METHOD_EXIT(); -+ _provider->decCurrentOperations(); -+ _provider = NULL; - } -- }; -+ PEG_METHOD_EXIT(); -+ } - }; - - PEGASUS_NAMESPACE_END -diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.h_old pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.h ---- pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.h_old 2008-07-15 14:12:49.000000000 +0200 -+++ pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.h 2008-07-15 14:18:13.000000000 +0200 -@@ -182,7 +182,7 @@ protected: - void _callEnableIndications( - CIMInstance & req_provider, - PEGASUS_INDICATION_CALLBACK_T _indicationCallback, -- CMPIProvider::OpProviderHolder & ph, -+ OpProviderHolder & ph, - const char *remoteInfo); - - /** -@@ -193,7 +193,7 @@ protected: - @param remoteInfo Remote Information - */ - void _callDisableIndications( -- CMPIProvider::OpProviderHolder & ph, -+ OpProviderHolder & ph, - const char *remoteInfo); - }; - -diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProvider.cpp_old pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProvider.cpp ---- pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProvider.cpp_old 2008-07-15 12:52:56.000000000 +0200 -+++ pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProvider.cpp 2008-07-15 13:07:20.000000000 +0200 +diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProvider.cpp.bz454590 pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProvider.cpp +--- pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProvider.cpp.bz454590 2008-02-20 11:22:58.000000000 +0100 ++++ pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProvider.cpp 2008-07-16 15:12:16.000000000 +0200 @@ -48,6 +48,13 @@ PEGASUS_USING_STD; PEGASUS_NAMESPACE_BEGIN @@ -1872,3 +1639,236 @@ diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProvider.cpp_old pegasus/ +} + +PEGASUS_NAMESPACE_END +diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProvider.h.bz454590 pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProvider.h +--- pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProvider.h.bz454590 2007-09-10 10:56:32.000000000 +0200 ++++ pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProvider.h 2008-07-16 15:12:16.000000000 +0200 +@@ -178,6 +178,11 @@ public: + + // typedef CMPIProviderFacade Base; + ++ CMPIProvider( ++ const String & name, ++ CMPIProviderModule *module, ++ ProviderVector *mv); ++ + virtual ~CMPIProvider(); + + virtual void initialize(CIMOMHandle & cimom); +@@ -192,6 +197,7 @@ public: + + Status getStatus(); + String getName() const; ++ String getNameWithType() const; + + void reset(); + +@@ -312,20 +318,39 @@ public: + */ + CIMInstance getProviderInstance (); + ++ void incCurrentOperations(); ++ void decCurrentOperations(); ++ int getCurrentOperations(); ++ ++ CIMOMHandle *getCIMOMHandle(); ++ CMPI_Broker *getBroker(); ++ ++ CMPIInstanceMI *getInstMI(); ++ CMPIMethodMI *getMethMI(); ++ CMPIAssociationMI *getAssocMI(); ++ CMPIPropertyMI *getPropMI(); ++ CMPIIndicationMI *getIndMI(); ++ ++ CMPIProviderModule *getModule(); ++ Uint32 getQuantum(); ++ void setQuantum(Uint32 quantum); ++ Mutex &getStatusMutex(); ++ ++ void set( ++ CMPIProviderModule *&module, ++ ProviderVector base, ++ CIMOMHandle *&cimomHandle); ++ + protected: + String _location; + Status _status; + CMPIProviderModule *_module; +- ProviderVector miVector; +- CMPI_Broker broker; ++ ProviderVector _miVector; ++ CMPI_Broker _broker; + CMPIrc unloadStatus; + + private: + virtual void _terminate(Boolean term); +- CMPIProvider( +- const String & name, +- CMPIProviderModule *module, +- ProviderVector *mv); + + static void initialize( + CIMOMHandle & cimom, +@@ -341,15 +366,7 @@ private: + */ + void waitUntilThreadsDone(); + +- void set( +- CMPIProviderModule *&module, +- ProviderVector base, +- CIMOMHandle *&cimomHandle); +- +- friend class CMPILocalProviderManager; +- friend class CMPIProviderManager; + class OpProviderHolder; +- friend class OpProviderHolder; + CIMOMHandle *_cimom_handle; + String _name; + AtomicInt _no_unload; +@@ -396,7 +413,7 @@ private: + generated the indication accepted a matching subscription. + */ + CIMInstance _providerInstance; +-//}; ++}; + + + // +@@ -404,67 +421,66 @@ private: + // for a CMPIProvider so it won't be unloaded during operations. + // + +- class OpProviderHolder ++class OpProviderHolder ++{ ++private: ++ CMPIProvider* _provider; ++public: ++ OpProviderHolder(): _provider( NULL ) + { +- private: +- CMPIProvider* _provider; +- +- public: +- OpProviderHolder(): _provider( NULL ) +- { +- } +- OpProviderHolder( const OpProviderHolder& p ): _provider( NULL ) +- { +- SetProvider( p._provider ); +- } +- OpProviderHolder( CMPIProvider* p ): _provider( NULL ) +- { +- SetProvider( p ); +- } +- ~OpProviderHolder() +- { +- UnSetProvider(); +- } +- CMPIProvider& GetProvider() +- { +- return(*_provider); +- } +- +- OpProviderHolder& operator=( const OpProviderHolder& x ) ++ } ++ OpProviderHolder( const OpProviderHolder& p ): _provider( NULL ) ++ { ++ SetProvider( p._provider ); ++ } ++ OpProviderHolder( CMPIProvider* p ): _provider( NULL ) ++ { ++ SetProvider( p ); ++ } ++ ~OpProviderHolder() ++ { ++ UnSetProvider(); ++ } ++ CMPIProvider& GetProvider() ++ { ++ return(*_provider); ++ } ++ OpProviderHolder& operator=( const OpProviderHolder& x ) ++ { ++ if (this == &x) + { +- if (this == &x) +- return(*this); +- SetProvider( x._provider ); + return(*this); + } ++ SetProvider( x._provider ); ++ return(*this); ++ } + +- void SetProvider( CMPIProvider* p ) ++ void SetProvider( CMPIProvider* p ) ++ { ++ PEG_METHOD_ENTER( ++ TRC_CMPIPROVIDERINTERFACE, ++ "OpProviderHolder::SetProvider()"); ++ UnSetProvider(); ++ if (p) + { +- PEG_METHOD_ENTER( +- TRC_CMPIPROVIDERINTERFACE, +- "OpProviderHolder::SetProvider()"); +- UnSetProvider(); +- if (p) +- { +- _provider = p; +- _provider->_current_operations++; +- } +- PEG_METHOD_EXIT(); ++ _provider = p; ++ _provider->incCurrentOperations(); + } ++ PEG_METHOD_EXIT(); ++ } + +- void UnSetProvider() ++ void UnSetProvider() ++ { ++ PEG_METHOD_ENTER( ++ TRC_CMPIPROVIDERINTERFACE, ++ "OpProviderHolder::UnSetProvider()"); ++ if (_provider) + { +- PEG_METHOD_ENTER( +- TRC_CMPIPROVIDERINTERFACE, +- "OpProviderHolder::UnSetProvider()"); +- if (_provider) +- { +- _provider->_current_operations--; +- _provider = NULL; +- } +- PEG_METHOD_EXIT(); ++ _provider->decCurrentOperations(); ++ _provider = NULL; + } +- }; ++ PEG_METHOD_EXIT(); ++ } + }; + + PEGASUS_NAMESPACE_END +diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.h.bz454590 pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.h +--- pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.h.bz454590 2008-02-01 20:47:12.000000000 +0100 ++++ pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.h 2008-07-16 15:12:16.000000000 +0200 +@@ -182,7 +182,7 @@ protected: + void _callEnableIndications( + CIMInstance & req_provider, + PEGASUS_INDICATION_CALLBACK_T _indicationCallback, +- CMPIProvider::OpProviderHolder & ph, ++ OpProviderHolder & ph, + const char *remoteInfo); + + /** +@@ -193,7 +193,7 @@ protected: + @param remoteInfo Remote Information + */ + void _callDisableIndications( +- CMPIProvider::OpProviderHolder & ph, ++ OpProviderHolder & ph, + const char *remoteInfo); + }; +