[PATCH 02/10] qemu: agent: dont set error after agent cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If there is an error event after eof event then after agent
is cleaned up on eof error flag will be set back and remains
set after next domain start up making agent unavailable.
Thus let's check before set this flag on error event.
---
 src/qemu/qemu_process.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index a581f96..3637f4b 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -180,7 +180,8 @@ qemuProcessHandleAgentError(qemuAgentPtr agent ATTRIBUTE_UNUSED,
 
     priv = vm->privateData;
 
-    priv->agentError = true;
+    if (priv->agent)
+        priv->agentError = true;
 
     virObjectUnlock(vm);
 }
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]