[Libvirt-cim] [PATCH] Fix AppliedFilterList Associators

Sharad Mishra snmishra at us.ibm.com
Sun Jun 26 16:37:34 UTC 2011


Sharad Mishra
Open Virtualization
Linux Technology Center
IBM

libvirt-cim-bounces at redhat.com wrote on 06/22/2011 06:26:14 PM:

> Chip Vincent <cvincent at linux.vnet.ibm.com>
> Sent by: libvirt-cim-bounces at redhat.com
>
> 06/22/11 06:26 PM
>
> Please respond to
> List for discussion and development of libvirt CIM
<libvirt-cim at redhat.com>
>
> To
>
> libvirt-cim at redhat.com
>
> cc
>
> Subject
>
> [Libvirt-cim] [PATCH] Fix AppliedFilterList Associators
>
> # HG changeset patch
> # User Chip Vincent <cvincent at us.ibm.com>
> # Date 1308792349 14400
> # Node ID 26cfeade3cb76c4ee43a7bd33ea456a250c1c1c2
> # Parent  a37f80f80d4b2dab73391989168592866c23ba9b
> Fix AppliedFilterList Associators.
>
> Fixed a few small issues relating to reading AppliedFilterList.
>
> Signed-off-by: Chip Vincent <cvincent at us.ibm.com>
>
> diff --git a/schema/AppliedFilterList.registration b/schema/
> AppliedFilterList.registration
> --- a/schema/AppliedFilterList.registration
> +++ b/schema/AppliedFilterList.registration
> @@ -1,3 +1,3 @@
>  # Copyright IBM Corp. 2011
>  # Classname Namespace ProviderName ProviderModule ProviderTypes
> -KVM_AppliedFilterList root/virt Virt_AppliedFilterList
> Virt_AppliedFilterList association
> +KVM_AppliedFilterList root/virt Virt_AppliedFilterList
> Virt_AppliedFilterList instance association
> diff --git a/src/Virt_AppliedFilterList.c b/src/Virt_AppliedFilterList.c
> --- a/src/Virt_AppliedFilterList.c
> +++ b/src/Virt_AppliedFilterList.c
> @@ -218,7 +218,7 @@
>                          CU_DEBUG("filterref = %s", ndev->filter_ref);
>
>                          if ((ndev->filter_ref != NULL) &&
> -                        STREQC(name, ndev->filter_ref)) {
> +                                STREQC(name, ndev->filter_ref)) {

Its a nit, can you fix the indentation above?

>                                  CU_DEBUG("Getting network device
instance");
>
>                                  CMPIInstance *instance = NULL;
> @@ -235,10 +235,10 @@
>
CIM_RES_TYPE_NET,
>                                                          &instance);
>
> -                                if (instance != NULL) {
> -                                        CU_DEBUG("adding instance to
list");
> +                                free(device_id);
> +
> +                                if (instance != NULL)
>                                          inst_list_add(list, instance);
> -                                }
>                          }
>                  }
>
> @@ -317,7 +317,7 @@
>                  CU_DEBUG("Checking net device '%s' for filterref",
>                          devices[i].id);
>
> -                if (STREQC(device_name, devices[i].id)) {
> +                if (STREQC(net_name, devices[i].id)) {
>                          CMPIInstance *instance = NULL;
>
>                          CU_DEBUG("Processing %s", ndev->filter_ref);
> @@ -332,18 +332,18 @@
>                                                  filter,
>                                                  &instance);
>
> +                        cleanup_filter(filter);
> +
>                          if (instance != NULL)
>                                  inst_list_add(list, instance);
> -
>                  }
>
>          }
>
>          cleanup_virt_devices(&devices, count);
> +
>   out:
> -
>          free(domain_name);
> -        free((char *)device_name);
>          free(net_name);
>
>          virDomainFree(dom);
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20110626/1abff257/attachment.htm>


More information about the Libvirt-cim mailing list