# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1202203372 -3600
# Node ID 1a648234fb0f0332580b546a8a5dd75746441a7a
# Parent 8805a8c0a8ee8bdcedfb60883a4436177d657cc3
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 8805a8c0a8ee -r 1a648234fb0f src/Virt_ResourcePoolConfigurationCapabilities.c
--- a/src/Virt_ResourcePoolConfigurationCapabilities.c Tue Feb 05 10:22:52 2008 +0100
+++ b/src/Virt_ResourcePoolConfigurationCapabilities.c Tue Feb 05 10:22:52 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 (is_get_inst)
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_NOT_FOUND,
+ "No such instance");
goto out;
+ }
inst = get_typed_instance(_BROKER,
pfx_from_conn(conn),