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

Diff for /pegasus/src/Pegasus/ProviderManager2/CMPI/CMPI_Instance.cpp between version 1.56 and 1.56.2.2

version 1.56, 2009/12/15 11:39:39 version 1.56.2.2, 2011/10/18 13:47:17
Line 220 
Line 220 
             {             {
             case SCMO_NOT_FOUND:             case SCMO_NOT_FOUND:
                 {                 {
                       data.state = CMPI_nullValue | CMPI_notFound;
                     CMSetStatus(rc, CMPI_RC_ERR_NO_SUCH_PROPERTY);                     CMSetStatus(rc, CMPI_RC_ERR_NO_SUCH_PROPERTY);
                     return data;                     return data;
                 }                 }
Line 229 
Line 230 
                 {                 {
                     // A NullValue does not indicate an error, but simply that                     // A NullValue does not indicate an error, but simply that
                     // no value has been set for the property.                     // no value has been set for the property.
   
                     // TBD: Though the CMPI specification mandates to return a  
                     // nullvalue when a property exists on an instance but has  
                     // not yet been assigned a value, for compatibility with  
                     // previous versions we return CMPI_RC_ERR_NO_SUCH_PROPERTY  
                     // in this case.  
                     // If SCMO would distinguish between nullvalues and values  
                     // that have not been set at all on an instance, we could  
                     // be more precise here.  
                     /*  
                          // Correct code for nullvalues  
                          data.type = type2CMPIType(type, isArray);                          data.type = type2CMPIType(type, isArray);
                          data.state = CMPI_nullValue;  
                          data.value.uint64 = 0;                          data.value.uint64 = 0;
                     */                      data.state = CMPI_nullValue;
                     // Code for properties that have not been set                      CMSetStatus(rc, CMPI_RC_OK);
                     CMSetStatus(rc, CMPI_RC_ERR_NO_SUCH_PROPERTY);  
                     return data;                     return data;
   
                 }                 }
                 break;                 break;
  
Line 320 
Line 307 
         if (!(type&CMPI_ARRAY))         if (!(type&CMPI_ARRAY))
         {         {
             CIMType cimType=type2CIMType(type);             CIMType cimType=type2CIMType(type);
             SCMBUnion scmoData = value2SCMOValue(data, type);              Boolean nullValue =  false;
               SCMBUnion scmoData = value2SCMOValue(data, type, nullValue);
  
             rc = inst->setPropertyWithOrigin(name,             rc = inst->setPropertyWithOrigin(name,
                                              cimType,                                              cimType,
                                              &scmoData,                                               nullValue ? 0 : &scmoData,
                                              false,  // isArray                                              false,  // isArray
                                              0,      // arraySize                                              0,      // arraySize
                                              origin);                                              origin);
Line 359 
Line 347 
                 {                 {
                     scmbArray=&(scmbArrayBuf[0]);                     scmbArray=&(scmbArrayBuf[0]);
                 }                 }
                   Boolean nullValue = false;
                 for (unsigned int x=0; x<arraySize; x++)                 for (unsigned int x=0; x<arraySize; x++)
                 {                 {
                     // Note:  First element is the array status information,                     // Note:  First element is the array status information,
                     //        therefore cmpi array starts at index 1!!!                     //        therefore cmpi array starts at index 1!!!
                     scmbArray[x] = value2SCMOValue(                     scmbArray[x] = value2SCMOValue(
                         &(arrData[x+1].value),                         &(arrData[x+1].value),
                         arrData[x+1].type);                          arrData[x+1].type,
                           nullValue);
                 }                 }
  
                 rc = inst->setPropertyWithOrigin(                 rc = inst->setPropertyWithOrigin(


Legend:
Removed from v.1.56  
changed lines
  Added in v.1.56.2.2

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2