# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1201177694 -3600
# Node ID dc5a3cf2e717e2630958454211bc7e0e4b8b2e94
# Parent 4cbd5d50bee23b8cf6d08f5724aef04b011d2030
HostSystem: Use cmpiutil function to validate incoming reference
Signed-off-by: Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
diff -r 4cbd5d50bee2 -r dc5a3cf2e717 src/Virt_HostSystem.c
--- a/src/Virt_HostSystem.c Thu Jan 24 13:22:28 2008 +0100
+++ b/src/Virt_HostSystem.c Thu Jan 24 13:28:14 2008 +0100
@@ -41,16 +41,10 @@ CMPIStatus validate_host_ref(const CMPIB
{
CMPIStatus s = {CMPI_RC_OK, NULL};
CMPIInstance *inst;
- const char *prop;
s = get_host_cs(broker, ref, &inst);
-
- prop = cu_compare_ref(ref, inst);
- if (prop != NULL) {
- cu_statusf(broker, &s,
- CMPI_RC_ERR_NOT_FOUND,
- "No such instance (%s)", prop);
- }
+ if (inst != NULL)
+ s = cu_validate_ref(broker, ref, inst);
return s;
}