From: George v. <geo...@gm...> - 2014-02-06 04:11:51
|
Hi, Is there any way to check if the value returned by CMGetProperty is of correct type? My dummy put request is given below: wsman put https:<Resource_URI>?key='abc' -h 10.1.124.102 -P 5986 -u user -p password -V -v -c Dummy -k property=fp The given check does not work in cases where 0 is a valid value for 'property'. data = CMGetProperty(ci, "property", &rc); val = data.value.uint16; if ( rc.rc != CMPI_RC_OK || val == NULL ){ CMSetStatusWithChars( _broker, &rc, CMPI_RC_ERR_FAILED, "error message." ); return; } This returns error for the given value fp (which is not an integer. 'val' will be equal to 0 in this case). But it returns error even when value of 'property' given in 'put' request is 0 which is valid in my case. Regards, George |