virDomainObjCheckActive() returns -1 if domain is not active, not 0. Fixes cb50436c6f "libxl: implement virDomainPM* functions" Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx> --- src/libxl/libxl_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index d0396e4781..215471fa0d 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -1459,7 +1459,7 @@ libxlDomainPMSuspendForDuration(virDomainPtr dom, if (libxlDomainObjBeginJob(driver, vm, LIBXL_JOB_MODIFY) < 0) goto cleanup; - if (!virDomainObjCheckActive(vm)) + if (virDomainObjCheckActive(vm) < 0) goto endjob; /* Unlock virDomainObjPtr to not deadlock with even handler, which will try -- 2.21.0
Attachment:
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list