
# HG changeset patch # User Heidi Eckhart <heidieck@linux.vnet.ibm.com> # Date 1201520629 -3600 # Node ID fefab2edaaf48e9f46b0bdac14b0e02a7b04d17f # Parent a888712b0cd510c36c2262cce82fa132c51a35a4 HostSystem: Use cmpiutil function to validate incoming reference Signed-off-by: Heidi Eckhart <heidieck@linux.vnet.ibm.com> diff -r a888712b0cd5 -r fefab2edaaf4 src/Virt_HostSystem.c --- a/src/Virt_HostSystem.c Mon Jan 28 12:42:53 2008 +0100 +++ b/src/Virt_HostSystem.c Mon Jan 28 12:43:49 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; }