os-cmpi-xen

changeset 105:05efdeb98072

Fix xen_utils_is_domain_active() to fail when domain does not exist.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
author Jim Fehlig <jfehlig@novell.com>
date Thu May 10 16:08:16 2007 -0600 (2007-05-10)
parents b66e845be7e4
children d5331bc6ed99
files src/xen_utils.c
line diff
     1.1 --- a/src/xen_utils.c	Wed May 09 18:04:04 2007 -0600
     1.2 +++ b/src/xen_utils.c	Thu May 10 16:08:16 2007 -0600
     1.3 @@ -690,6 +690,12 @@ int xen_utils_is_domain_active(xen_utils
     1.4        return 0;
     1.5     }
     1.6  
     1.7 +   if (vms->size == 0) {
     1.8 +      /* There were no vms with given name - still need to free empty set. */
     1.9 +      xen_vm_set_free(vms);
    1.10 +      return 0;
    1.11 +   }
    1.12 +   
    1.13     assert(vms->size == 1);
    1.14     xen_vm_record *vm_rec;
    1.15     if (!xen_vm_get_record(session->xen, &vm_rec, vms->contents[0])) {