]> xenbits.xensource.com Git - libvirt.git/commitdiff
vbox: fix a bug in _machineStateInactive
authorYohan BELLEGUIC <yohan.belleguic@diateam.net>
Wed, 19 Nov 2014 08:53:15 +0000 (09:53 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 19 Nov 2014 13:35:33 +0000 (14:35 +0100)
This function returned non-inactive domains instead of active
domains.  This broke virConnectNumOfDefinedDomains() and
virConnectListDefinedDomains() functions.

src/vbox/vbox_tmpl.c

index de8744d5a08b0966514c68c599b81d136be5db58..37ec8e1c44b2da460810b2001dc80f1ed9f7e646 100644 (file)
@@ -4607,8 +4607,8 @@ static bool _machineStateOnline(PRUint32 state)
 
 static bool _machineStateInactive(PRUint32 state)
 {
-    return ((state > MachineState_FirstOnline) &&
-            (state < MachineState_LastOnline));
+    return ((state < MachineState_FirstOnline) ||
+            (state > MachineState_LastOnline));
 }
 
 static bool _machineStateNotStart(PRUint32 state)