[Libvirt-cim] [PATCH 04 of 12] ESD: Adoption of changes to std_assoc struct in std_association
Kaitlin Rupert
kaitlin at linux.vnet.ibm.com
Thu Nov 29 19:09:48 UTC 2007
Heidi Eckhart wrote:
> @@ -129,17 +129,18 @@ static CMPIInstance *make_ref(const CMPI
> struct std_assoc_info *info,
> struct std_assoc *assoc)
> {
> + CMPIStatus s = {CMPI_RC_OK, NULL};
> CMPIInstance *refinst = NULL;
> - char *base;
> + virConnectPtr conn = NULL;
> uint16_t prop_value = 1;
>
> - base = class_base_name(assoc->assoc_class);
> - if (base == NULL)
> - goto out;
> + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s);
> + if (conn == NULL)
> + return NULL;
>
> refinst = get_typed_instance(_BROKER,
> - CLASSNAME(ref),
> - base,
> + pfx_from_conn(conn),
> + "ElementSettingData",
> NAMESPACE(ref));
>
> if (refinst != NULL) {
> @@ -165,33 +166,55 @@ static CMPIInstance *make_ref(const CMPI
> (CMPIValue *)&prop_value, CMPI_uint16);
> }
>
> -out:
> - free(base);
> + virConnectClose(conn);
>
> return refinst;
> }
>
Could this too be in a separate patch? =)
--
Kaitlin Rupert
IBM Linux Technology Center
karupert at us.ibm.com
More information about the Libvirt-cim
mailing list