[Libvirt-cim] [PATCH 1 of 2] ComputerSystemDeletedIndication wasn't being called when a guest was removed. This patch fix it
Kaitlin Rupert
kaitlin at linux.vnet.ibm.com
Wed Aug 26 22:36:42 UTC 2009
> +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 at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list