[Libvirt-cim] [PATCH] Add ASSOC_MATCH() to HostedService to prevent duplicate classes from being returned if CIM_HostedService is used as the association class option during an association related query

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Fri Nov 16 21:57:27 UTC 2007


# HG changeset patch
# User Kaitlin Rupert <karupert at us.ibm.com>
# Date 1195253640 28800
# Node ID 92c1de7f036cf77048be756ddc79c0b2fd88b79e
# Parent  006c7d27c968fb509fc667f4d5513cd79a9c197a
Add ASSOC_MATCH() to HostedService to prevent duplicate classes from being returned if CIM_HostedService is used as the association class option during an association related query.

Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>

diff -r 006c7d27c968 -r 92c1de7f036c src/Virt_HostedService.c
--- a/src/Virt_HostedService.c	Thu Nov 15 09:49:45 2007 -0800
+++ b/src/Virt_HostedService.c	Fri Nov 16 14:54:00 2007 -0800
@@ -43,6 +43,8 @@ static CMPIStatus service_to_host(const 
         CMPIStatus s;
         CMPIInstance *instance;
 
+        ASSOC_MATCH(info->provider_name, CLASSNAME(ref));
+
         s = get_host_cs(_BROKER, ref, &instance);
         if (s.rc == CMPI_RC_OK)
                 inst_list_add(list, instance);
@@ -56,6 +58,8 @@ static CMPIStatus host_to_service(const 
 {
         CMPIStatus s = {CMPI_RC_OK, NULL};
         CMPIInstance *inst;
+
+        ASSOC_MATCH(info->provider_name, CLASSNAME(ref));
 
         s = rpcs_instance(ref, &inst, _BROKER);
         if (s.rc != CMPI_RC_OK)




More information about the Libvirt-cim mailing list