[Libvirt-cim] [PATCH 3 of 3] Fix class prefix to depend on established hypervisor connection

Heidi Eckhart heidieck at linux.vnet.ibm.com
Tue Nov 27 10:08:13 UTC 2007


Dan Smith wrote:
> HE> diff -r 50b0c2bad1e3 -r 883d767c6425 src/Virt_ElementConformsToProfile.c
> HE> --- a/src/Virt_ElementConformsToProfile.c	Fri Nov 23 11:05:46 2007 +0100
> HE> +++ b/src/Virt_ElementConformsToProfile.c	Fri Nov 23 11:11:22 2007 +0100
> HE> @@ -50,7 +50,8 @@ static CMPIStatus elem_instances(const C
> HE>  static CMPIStatus elem_instances(const CMPIObjectPath *ref,
> HE>                                   struct std_assoc_info *info,
> HE>                                   struct inst_list *list,
> HE> -                                 struct reg_prof *profile)
> HE> +                                 struct reg_prof *profile,
> HE> +                                 virConnectPtr conn)
>
> Since we have a ref here, can we avoid passing a connection in and do
> the connect_by_classname() inside?
That does not make sense, as elem_instances() is an internal function 
only called by the external function prof_to_elem() and the connection 
was (and must be) already established by prof_to_elem(). So this would 
establish a second - unnecessary - connection to libvirt.

-- 
Regards

Heidi Eckhart
Software Engineer
Linux Technology Center - Open Hypervisor

heidieck at linux.vnet.ibm.com

**************************************************
IBM Deutschland Entwicklung GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschaeftsfuehrung: Herbert Kircher
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294




More information about the Libvirt-cim mailing list