version 1.54.2.7, 2009/10/21 15:49:32
|
version 1.54.2.8, 2009/10/24 23:34:49
|
|
|
{ | { |
// 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.state = CMPI_nullValue; |
data.value.uint64 = 0; | data.value.uint64 = 0; |
|
*/ |
|
// Code for properties that have not been set |
|
CMSetStatus(rc, CMPI_RC_ERR_NO_SUCH_PROPERTY); |
|
return data; |
|
|
} | } |
break; | break; |
| |
|
|
cmpiRC.rc = CMPI_RC_ERR_INVALID_PARAMETER; | cmpiRC.rc = CMPI_RC_ERR_INVALID_PARAMETER; |
break; | break; |
case SCMO_NOT_FOUND: | case SCMO_NOT_FOUND: |
cmpiRC.rc = CMPI_RC_ERR_NO_SUCH_PROPERTY; |
//TBD: Should return an error here, but previous impl. |
|
// returned OK. Is this correct? |
|
//cmpiRC.rc = CMPI_RC_ERR_NO_SUCH_PROPERTY; |
|
cmpiRC.rc = CMPI_RC_OK; |
break; | break; |
case SCMO_WRONG_TYPE: | case SCMO_WRONG_TYPE: |
cmpiRC.rc = CMPI_RC_ERR_INVALID_DATA_TYPE; | cmpiRC.rc = CMPI_RC_ERR_INVALID_DATA_TYPE; |
|
|
"or namespace of instance"); | "or namespace of instance"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
CMReturnWithString( | CMReturnWithString( |
CMPI_RC_ERR_TYPE_MISMATCH, |
CMPI_RC_ERR_FAILED, |
string2CMPIString("Incompatible ObjectPath")); | string2CMPIString("Incompatible ObjectPath")); |
} | } |
} | } |
|
|
CMPIInstanceFT *CMPI_InstanceOnStack_Ftab=&instanceOnStack_FT; | CMPIInstanceFT *CMPI_InstanceOnStack_Ftab=&instanceOnStack_FT; |
| |
| |
CMPI_InstanceOnStack::CMPI_InstanceOnStack(const CIMInstance& ci) |
CMPI_InstanceOnStack::CMPI_InstanceOnStack(const SCMOInstance& ci) |
{ | { |
PEG_METHOD_ENTER( | PEG_METHOD_ENTER( |
TRC_CMPIPROVIDERINTERFACE, | TRC_CMPIPROVIDERINTERFACE, |