
+static CMPIStatus set_properties_from_dominfo(const CMPIBroker *broker, + const char *prefix, + struct domain *dominfo, + CMPIInstance *instance) +{ + CMPIStatus s = {CMPI_RC_ERR_FAILED, NULL}; + CMPIObjectPath *ref = NULL; + + ref = CMGetObjectPath(instance, &s); + if ((ref == NULL) || (s.rc != CMPI_RC_OK)) + return s; + + CMSetProperty(instance, "Name", + (CMPIValue *)dominfo->name, CMPI_chars); + + CMSetProperty(instance, "ElementName", + (CMPIValue *)dominfo->name, CMPI_chars); + + CMSetProperty(instance, "UUID", + (CMPIValue *)dominfo->uuid, CMPI_chars); + + if (!set_capdesc_from_dominfo(broker, dominfo, ref, instance)) { + CU_DEBUG("Problem in set_capdesc_from_dominfo function"); + goto out;
Since you're returning the CMPIStatus variable from this function, you should set error message whenever a failure occurs. Otherwise, the error message might not get set (check the call flow - the error message is never set). -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com