[Libvirt-cim] [PATCH 03 of 12] EC: Adoption of changes to std_assoc struct in std_association

Dan Smith danms at us.ibm.com
Thu Nov 29 16:40:17 UTC 2007


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 at us.ibm.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20071129/479a1832/attachment.sig>


More information about the Libvirt-cim mailing list