# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1204541460 -3600
# Node ID 5c6274463420e89bebccb718d310b53c7f712909
# Parent a92cf052a7742789abbec11a463578fb4f8ae24d
EC: adopt ComputerSystem interface changes
Signed-off-by: Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
diff -r a92cf052a774 -r 5c6274463420 src/Virt_ElementCapabilities.c
--- a/src/Virt_ElementCapabilities.c Mon Mar 03 11:50:59 2008 +0100
+++ b/src/Virt_ElementCapabilities.c Mon Mar 03 11:51:00 2008 +0100
@@ -205,7 +205,7 @@ static CMPIStatus cs_to_cap(const CMPIOb
if (!match_hypervisor_prefix(ref, info))
goto out;
- s = get_domain(_BROKER, ref, &inst);
+ s = get_domain_by_ref(_BROKER, ref, &inst);
if (s.rc != CMPI_RC_OK)
goto out;
@@ -229,8 +229,7 @@ static CMPIStatus cap_to_cs(const CMPIOb
struct inst_list *list)
{
const char *inst_id;
- CMPIInstance *inst;
- virConnectPtr conn;
+ CMPIInstance *inst = NULL;
CMPIStatus s = {CMPI_RC_OK, NULL};
if (!match_hypervisor_prefix(ref, info))
@@ -247,19 +246,11 @@ static CMPIStatus cap_to_cs(const CMPIOb
goto out;
}
- conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s);
- if (conn == NULL)
- goto out;
-
- inst = instance_from_name(_BROKER, conn, inst_id, ref);
- if (inst)
- inst_list_add(list, inst);
- else
- cu_statusf(_BROKER, &s,
- CMPI_RC_ERR_NOT_FOUND,
- "No such instance (%s)", inst_id);
-
- virConnectClose(conn);
+ s = get_domain_by_name(_BROKER, ref, inst_id, &inst);
+ if (s.rc != CMPI_RC_OK)
+ goto out;
+
+ inst_list_add(list, inst);
out:
return s;