# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1202131345 -3600
# Node ID 971b870679bd5c11fb872c27b09150f612040eb9
# Parent 4f877945eeba7e1c6a690150057b0221a882d002
RPCC: getInstance does not take care of client given object path
wbemgi
'http://localhost:5988/root/virt:KVM_ResourcePoolConfigurationCapabilities.InstanceID="wrong"'
returns the instance instead of NOT_FOUND.
Signed-off-by: Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
diff -r 4f877945eeba -r 971b870679bd src/Virt_ResourcePoolConfigurationCapabilities.c
--- a/src/Virt_ResourcePoolConfigurationCapabilities.c Mon Feb 04 14:22:24 2008 +0100
+++ b/src/Virt_ResourcePoolConfigurationCapabilities.c Mon Feb 04 14:22:25 2008 +0100
@@ -56,8 +56,13 @@ static CMPIStatus get_rpc_cap(const CMPI
virConnectPtr conn = NULL;
conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s);
- if (conn == NULL)
+ if (conn == NULL) {
+ if (getInstance)
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_NOT_FOUND,
+ "No such instance");
goto out;
+ }
inst = get_typed_instance(_BROKER,
pfx_from_conn(conn),