Fix lookup of xen VM after define (Cole Robinson)

This commit is contained in:
Daniel P. Berrange 2008-08-28 11:59:07 +00:00
parent ff7ecc1d5b
commit 8f762e34f3
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,8 @@
Thu Aug 28 12:58:15 BST 2008 Daniel P. Berrange <berrange@redhat.com>
* src/xend_internal.c: Fix lookup of Xen VMs after define
(patch from Cole Robinson)
Thu Aug 28 11:08:15 CEST 2008 Jim Meyering <meyering@redhat.com>
improve parallel build support

View File

@ -4270,7 +4270,6 @@ xenDaemonDomainMigratePerform (virDomainPtr domain,
virDomainPtr xenDaemonDomainDefineXML(virConnectPtr conn, const char *xmlDesc) {
int ret;
char *sexpr;
char *name = NULL;
virDomainPtr dom;
xenUnifiedPrivatePtr priv;
virDomainDefPtr def;
@ -4292,15 +4291,17 @@ virDomainPtr xenDaemonDomainDefineXML(virConnectPtr conn, const char *xmlDesc) {
goto error;
}
DEBUG("Defining w/ sexpr: \n%s", sexpr);
ret = xend_op(conn, "", "op", "new", "config", sexpr, NULL);
VIR_FREE(sexpr);
if (ret != 0) {
virXendError(conn, VIR_ERR_XEN_CALL,
_("Failed to create inactive domain %s\n"), name);
_("Failed to create inactive domain %s\n"), def->name);
goto error;
}
dom = virDomainLookupByName(conn, name);
dom = virDomainLookupByName(conn, def->name);
if (dom == NULL) {
goto error;
}