# HG changeset patch
# User Chip Vincent <cvincent(a)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(a)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)) {
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);