# HG changeset patch
# User Jim Fehlig <jfehlig(a)novell.com>
# Date 1231965200 25200
# Node ID b4f1d84b87c20350fdfe0651a684a24b7e03ba28
# Parent 8c56ab06aeb9b89f419f1befe6182c92ad5edbb8
Use previously obtained libvirt connection object
Libvirt connection object already obtained from virDomainPtr, use it.
Signed-off-by: Jim Fehlig <jfehlig(a)novell.com>
diff -r 8c56ab06aeb9 -r b4f1d84b87c2 src/Virt_ComputerSystem.c
--- a/src/Virt_ComputerSystem.c Wed Jan 14 08:41:52 2009 -0800
+++ b/src/Virt_ComputerSystem.c Wed Jan 14 13:33:20 2009 -0700
@@ -800,13 +800,13 @@ static CMPIStatus domain_reset(virDomain
if (ret != 0) {
virt_set_status(_BROKER, &s,
CMPI_RC_ERR_FAILED,
- virDomainGetConnect(dom),
+ conn,
"Unable to destroy domain");
goto out;
}
- dom = virDomainLookupByName(virDomainGetConnect(dom),
- virDomainGetName(dom));
+ dom = virDomainLookupByName(conn,
+ virDomainGetName(dom));
if (dom == NULL) {
dom = virDomainDefineXML(conn, xml);
@@ -814,7 +814,7 @@ static CMPIStatus domain_reset(virDomain
CU_DEBUG("Failed to define domain from XML");
virt_set_status(_BROKER, &s,
CMPI_RC_ERR_FAILED,
- virDomainGetConnect(dom),
+ conn,
"Unable to define domain");
goto out;
}
@@ -827,7 +827,7 @@ static CMPIStatus domain_reset(virDomain
if (ret != 0)
virt_set_status(_BROKER, &s,
CMPI_RC_ERR_FAILED,
- virDomainGetConnect(dom),
+ conn,
"Failed to start domain");
out:
_______________________________________________
Libvirt-cim mailing list
Libvirt-cim(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-cim
--
Richard Maciel, MSc
IBM Linux Technology Center
rmaciel(a)linux.vnet.ibm.com