HE> --- a/src/Virt_ElementCapabilities.c Thu Nov 29 12:02:50 2007 +0100
HE> +++ b/src/Virt_ElementCapabilities.c Thu Nov 29 13:11:04 2007 +0100
HE> @@ -237,21 +237,23 @@ static CMPIStatus pool_to_alloc(const CM
HE> out:
HE> return s;
HE> }
HE> +
HE> static CMPIInstance *make_ref(const CMPIObjectPath *ref,
HE> const CMPIInstance *inst,
HE> struct std_assoc_info *info,
HE> struct std_assoc *assoc)
HE> {
HE> - CMPIInstance *refinst;
HE> - char *base;
HE> -
HE> - base = class_base_name(assoc->assoc_class);
HE> - if (base == NULL)
HE> + CMPIStatus s = {CMPI_RC_OK, NULL};
HE> + CMPIInstance *refinst = NULL;
HE> + virConnectPtr conn = NULL;
HE> +
HE> + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s);
HE> + if (conn == NULL)
HE> return NULL;
HE> refinst = get_typed_instance(_BROKER,
HE> - CLASSNAME(ref),
HE> - base,
HE> + pfx_from_conn(conn),
HE> + "ElementCapabilities",
HE> NAMESPACE(ref));
HE> if (refinst != NULL) {
HE> @@ -265,109 +267,146 @@ static CMPIInstance *make_ref(const CMPI
HE> (CMPIValue *)&instop, CMPI_ref);
HE> }
HE> - free(base);
HE> + virConnectClose(conn);
HE> return refinst;
HE> }
Hmm, are either of these hunks related to the API change?
--
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms(a)us.ibm.com