# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1204541460 -3600
# Node ID eefe9c56b43c7ca0cad6f579fd88c5b89134bba0
# Parent 5c6274463420e89bebccb718d310b53c7f712909
SDS: adopt ComputerSystem interface changes
Signed-off-by: Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
diff -r 5c6274463420 -r eefe9c56b43c src/Virt_SettingsDefineState.c
--- a/src/Virt_SettingsDefineState.c Mon Mar 03 11:51:00 2008 +0100
+++ b/src/Virt_SettingsDefineState.c Mon Mar 03 11:51:00 2008 +0100
@@ -127,7 +127,7 @@ static CMPIStatus vs_to_vssd(const CMPIO
if (!match_hypervisor_prefix(ref, info))
return s;
- s = get_domain(_BROKER, ref, &inst);
+ s = get_domain_by_ref(_BROKER, ref, &inst);
if (s.rc != CMPI_RC_OK)
goto out;
@@ -156,10 +156,8 @@ static CMPIStatus vssd_to_vs(const CMPIO
char *pfx = NULL;
char *name = NULL;
int ret;
- virConnectPtr conn = NULL;
- CMPIStatus s = {CMPI_RC_OK, NULL};
- CMPIInstance *cs;
- CMPIInstance *inst;
+ CMPIStatus s = {CMPI_RC_OK, NULL};
+ CMPIInstance *inst = NULL;
if (!match_hypervisor_prefix(ref, info))
return s;
@@ -183,25 +181,15 @@ static CMPIStatus vssd_to_vs(const CMPIO
goto out;
}
- conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s);
- if (conn == NULL)
- goto out;
-
- cs = instance_from_name(_BROKER,
- conn,
- name,
- ref);
- if (cs != NULL)
- inst_list_add(list, cs);
-
- cu_statusf(_BROKER, &s,
- CMPI_RC_OK,
- "");
+ s = get_domain_by_name(_BROKER, ref, name, &inst);
+ if (s.rc != CMPI_RC_OK)
+ goto out;
+
+ inst_list_add(list, inst);
+
out:
free(name);
free(pfx);
-
- virConnectClose(conn);
return s;
}