(file) Return to DefaultProviderManager.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / ProviderManager2 / Default

Diff for /pegasus/src/Pegasus/ProviderManager2/Default/DefaultProviderManager.cpp between version 1.11.4.3 and 1.11.4.4

version 1.11.4.3, 2004/03/10 14:19:29 version 1.11.4.4, 2004/03/18 20:38:36
Line 2532 
Line 2532 
  
     ProviderRegistrationManager * _providerRegistrationManager = GetProviderRegistrationManager();     ProviderRegistrationManager * _providerRegistrationManager = GetProviderRegistrationManager();
  
     try      try {
     {  
     // get provider module name     // get provider module name
     String moduleName;     String moduleName;
     CIMInstance mInstance = request->providerModule;     CIMInstance mInstance = request->providerModule;
     Uint32 pos = mInstance.findProperty(CIMName ("Name"));     Uint32 pos = mInstance.findProperty(CIMName ("Name"));
  
     if(pos != PEG_NOT_FOUND)        if(pos != PEG_NOT_FOUND) {
     {  
         mInstance.getProperty(pos).getValue().get(moduleName);         mInstance.getProperty(pos).getValue().get(moduleName);
     }     }
  
Line 2549 
Line 2547 
     //     //
     // get operational status     // get operational status
     //     //
         if (!disableProviderOnly)        if (!disableProviderOnly) {
     {  
         Uint32 pos2 = mInstance.findProperty(CIMName ("OperationalStatus"));         Uint32 pos2 = mInstance.findProperty(CIMName ("OperationalStatus"));
             if (pos2 != PEG_NOT_FOUND)                 if (pos2 != PEG_NOT_FOUND) {
         {  
             //             //
             //  ATTN-CAKG-P2-20020821: Check for null status?             //  ATTN-CAKG-P2-20020821: Check for null status?
             //             //
Line 2563 
Line 2559 
         //         //
         // update module status from OK to Stopping         // update module status from OK to Stopping
         //         //
             for (Uint32 i=0, n = operationalStatus.size(); i < n; i++)           for (Uint32 i=0, n = operationalStatus.size(); i < n; i++) {
         {                    if (operationalStatus[i] == _MODULE_OK) {
                 if (operationalStatus[i] == _MODULE_OK)  
             {  
                 operationalStatus.remove(i);                 operationalStatus.remove(i);
             }             }
         }         }
Line 2574 
Line 2568 
         operationalStatus.append(_MODULE_STOPPING);         operationalStatus.append(_MODULE_STOPPING);
  
         if(_providerRegistrationManager->setProviderModuleStatus         if(_providerRegistrationManager->setProviderModuleStatus
             (moduleName, operationalStatus) == false)                 (moduleName, operationalStatus) == false) {
         {  
             //l10n             //l10n
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, "set module status failed.");             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, "set module status failed.");
                 throw PEGASUS_CIM_EXCEPTION_L(                 throw PEGASUS_CIM_EXCEPTION_L(
                     CIM_ERR_FAILED,                     CIM_ERR_FAILED,
                     MessageLoaderParms(                       MessageLoaderParms("ProviderManager.ProviderManagerService."
                         "ProviderManager.ProviderManagerService."                                "SET_MODULE_STATUS_FAILED","set module status failed."));
                             "SET_MODULE_STATUS_FAILED",  
                 "set module status failed."));  
         }         }
     }     }
  
Line 2595 
Line 2586 
            mInstance.getProperty(            mInstance.getProperty(
               mInstance.findProperty("Location")).getValue().toString());               mInstance.findProperty("Location")).getValue().toString());
  
     for(Uint32 i = 0, n = _pInstances.size(); i < n; i++)        for (Uint32 i = 0, n = _pInstances.size(); i < n; i++) {
     {  
             String pName(_pInstances[i].getProperty(             String pName(_pInstances[i].getProperty(
                _pInstances[i].findProperty("Name")).getValue().toString());                _pInstances[i].findProperty("Name")).getValue().toString());
  
             Sint16 ret_value = providerManager.disableProvider(physicalName,pName);             Sint16 ret_value = providerManager.disableProvider(physicalName,pName);
  
             if (ret_value == 0)           if (ret_value == 0) {
             {  
                 // disable failed since there are pending requests,                 // disable failed since there are pending requests,
                 // update module status from Stopping to OK if                 // update module status from Stopping to OK if
                 // disableProviderOnly is not true                 // disableProviderOnly is not true
                 if (!disableProviderOnly)              if (!disableProviderOnly) {
                 {                 for(Uint32 j=0, m = operationalStatus.size(); j < m; j++) {
                     for(Uint32 j=0, m = operationalStatus.size(); j < m; j++)                    if (operationalStatus[j] == _MODULE_STOPPING) {
                     {  
                         if (operationalStatus[j] == _MODULE_STOPPING)  
                         {  
                             operationalStatus.remove(j);                             operationalStatus.remove(j);
     }     }
                     }                     }
Line 2620 
Line 2606 
                     operationalStatus.append(_MODULE_OK);                     operationalStatus.append(_MODULE_OK);
  
                     if(_providerRegistrationManager->setProviderModuleStatus                     if(_providerRegistrationManager->setProviderModuleStatus
                         (moduleName, operationalStatus) == false)                       (moduleName, operationalStatus) == false) {
     {                    throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,
                         throw PEGASUS_CIM_EXCEPTION_L(                       MessageLoaderParms("ProviderManager.ProviderManagerService."
                             CIM_ERR_FAILED,                          "SET_MODULE_STATUS_FAILED","set module status failed."));
                             MessageLoaderParms(  
                                 "ProviderManager.ProviderManagerService."  
                                     "SET_MODULE_STATUS_FAILED",  
                                 "set module status failed."));  
                     }                     }
                 }                 }
             }             }
             else if (ret_value == 1)  
         {           else if (ret_value == 1) {
                 // if It is an indication provider                 // if It is an indication provider
                 // remove the entry from the table since the                 // remove the entry from the table since the
                 // provider has been disabled                 // provider has been disabled
                 if (_indicationProviders[i])              if (_indicationProviders[i]) {
             {  
                     _removeEntry(_generateKey(pName,physicalName));                     _removeEntry(_generateKey(pName,physicalName));
                 }                 }
             }             }
             else           else {
             {  
                 // disable failed for other reason, throw exception                 // disable failed for other reason, throw exception
                 // update module status from Stopping to OK if                 // update module status from Stopping to OK if
                 // disableProviderOnly is not true                 // disableProviderOnly is not true
                 if (!disableProviderOnly)              if (!disableProviderOnly) {
                 {                 for (Uint32 j=0, m = operationalStatus.size(); j < m; j++) {
                     for(Uint32 j=0, m = operationalStatus.size(); j < m; j++)                    if (operationalStatus[j] == _MODULE_STOPPING) {
                     {  
                         if (operationalStatus[j] == _MODULE_STOPPING)  
                         {  
                             operationalStatus.remove(j);                             operationalStatus.remove(j);
                         }                         }
                     }                     }
Line 2659 
Line 2636 
                     operationalStatus.append(_MODULE_OK);                     operationalStatus.append(_MODULE_OK);
  
                     if(_providerRegistrationManager->setProviderModuleStatus                     if(_providerRegistrationManager->setProviderModuleStatus
                         (moduleName, operationalStatus) == false)                             (moduleName, operationalStatus) == false) {
                     {                    throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,
                         throw PEGASUS_CIM_EXCEPTION_L(                       MessageLoaderParms("ProviderManager.ProviderManagerService."
                             CIM_ERR_FAILED,                          "SET_MODULE_STATUS_FAILED","set module status failed."));
                             MessageLoaderParms(  
                                 "ProviderManager.ProviderManagerService."  
                                     "SET_MODULE_STATUS_FAILED",  
                                 "set module status failed."));  
             }             }
         }         }
  
                 throw PEGASUS_CIM_EXCEPTION_L(              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,
                     CIM_ERR_FAILED,                 MessageLoaderParms("ProviderManager.ProviderManagerService."
                     MessageLoaderParms(                    "DISABLE_PROVIDER_FAILED","Failed to disable the provider."));
                         "ProviderManager.ProviderManagerService."  
                             "DISABLE_PROVIDER_FAILED",  
                         "Failed to disable the provider."));  
             }             }
         }         }
         // disable succeed         // disable succeed
         // update module status from Stopping to Stopped if         // update module status from Stopping to Stopped if
         // disableProviderOnly is not true         // disableProviderOnly is not true
         if (!disableProviderOnly)        if (!disableProviderOnly) {
         {  
             // update module status from Stopping to Stopped             // update module status from Stopping to Stopped
             for(Uint32 j=0, m = operationalStatus.size(); j < m; j++)           for (Uint32 j=0, m = operationalStatus.size(); j < m; j++) {
             {              if (operationalStatus[j] == _MODULE_STOPPING) {
                 if (operationalStatus[j] == _MODULE_STOPPING)  
                 {  
                     operationalStatus.remove(j);                     operationalStatus.remove(j);
         operationalStatus.append(_MODULE_STOPPED);         operationalStatus.append(_MODULE_STOPPED);
                 }                 }
             }             }
  
         if(_providerRegistrationManager->setProviderModuleStatus         if(_providerRegistrationManager->setProviderModuleStatus
             (moduleName, operationalStatus) == false)                 (moduleName, operationalStatus) == false) {
         {  
             //l10n             //l10n
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,
             //"set module status failed.");             //"set module status failed.");
                 throw PEGASUS_CIM_EXCEPTION_L(              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,
                       CIM_ERR_FAILED,                 MessageLoaderParms("ProviderManager.ProviderManagerService."
                       MessageLoaderParms(                    "SET_MODULE_STATUS_FAILED","set module status failed."));
                       "ProviderManager.ProviderManagerService."  
                        "SET_MODULE_STATUS_FAILED",  
                 "set module status failed."));  
         }         }
     }     }
     }     }
Line 2720 
Line 2683 
                          "Exception: " + e.getMessage());                          "Exception: " + e.getMessage());
         cimException = CIMException(CIM_ERR_FAILED, e.getMessage());         cimException = CIMException(CIM_ERR_FAILED, e.getMessage());
     }     }
     catch(...)      catch(...) {
     {  
         PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,         PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,
                          "Exception: Unknown");                          "Exception: Unknown");
         //l10n         //l10n


Legend:
Removed from v.1.11.4.3  
changed lines
  Added in v.1.11.4.4

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2