render / rpms / libvirt

Forked from rpms/libvirt 11 months ago
Clone
9119d9
From 44f6d2dbebe8d8e3dc95465d0e90cb8c30e0cdb8 Mon Sep 17 00:00:00 2001
9119d9
Message-Id: <44f6d2dbebe8d8e3dc95465d0e90cb8c30e0cdb8@dist-git>
9119d9
From: Jiri Denemark <jdenemar@redhat.com>
9119d9
Date: Tue, 9 Sep 2014 09:17:58 +0200
9119d9
Subject: [PATCH] qemu: Avoid incrementing jobs_queued if virTimeMillisNow
9119d9
 fails
9119d9
9119d9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9119d9
(cherry picked from commit 4365247677fb835edd00e791a9ed13788b812bfa)
9119d9
9119d9
https://bugzilla.redhat.com/show_bug.cgi?id=1063724
9119d9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9119d9
---
9119d9
 src/qemu/qemu_domain.c | 3 +--
9119d9
 1 file changed, 1 insertion(+), 2 deletions(-)
9119d9
9119d9
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
9119d9
index 7b54306..8c94e27 100644
9119d9
--- a/src/qemu/qemu_domain.c
9119d9
+++ b/src/qemu/qemu_domain.c
9119d9
@@ -1222,13 +1222,12 @@ qemuDomainObjBeginJobInternal(virQEMUDriverPtr driver,
9119d9
               qemuDomainAsyncJobTypeToString(priv->job.asyncJob),
9119d9
               obj, obj->def->name);
9119d9
 
9119d9
-    priv->jobs_queued++;
9119d9
-
9119d9
     if (virTimeMillisNow(&now) < 0) {
9119d9
         virObjectUnref(cfg);
9119d9
         return -1;
9119d9
     }
9119d9
 
9119d9
+    priv->jobs_queued++;
9119d9
     then = now + QEMU_JOB_WAIT_TIME;
9119d9
 
9119d9
     virObjectRef(obj);
9119d9
-- 
9119d9
2.1.0
9119d9