Switch over todo domain lookup based on UUID in virDomainAssignDef

This commit is contained in:
Daniel P. Berrange 2009-04-19 15:16:43 +00:00
parent 8372a8c127
commit cb43623acd
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Sun Apr 19 16:14:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
* src/domain_conf.c: Switch over todo domain lookup based
on UUID in virDomainAssignDef
Sun Apr 19 16:14:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
* docs/libvirt-api.xml, docs/libvirt-refs.xml,

View File

@ -499,7 +499,7 @@ virDomainObjPtr virDomainAssignDef(virConnectPtr conn,
{
virDomainObjPtr domain;
if ((domain = virDomainFindByName(doms, def->name))) {
if ((domain = virDomainFindByUUID(doms, def->uuid))) {
if (!virDomainIsActive(domain)) {
virDomainDefFree(domain->def);
domain->def = def;