On 30.08.2012 15:12, Jiri Denemark wrote:
Before commit 05447e3af44ec153314ff97cd611330d9b4b5730,
qemuAgentCommand
blocked until it got a reply or appropriate event. When new parameter
was added to qemuAgentCommand in the above commit, all existing callers
of it were updated in a wrong way changing them from blocking to
5-seconds timeout.
---
src/qemu/qemu_agent.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index 6a7a0b4..51e60d2 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -1296,7 +1296,7 @@ int qemuAgentShutdown(qemuAgentPtr mon,
mon->await_event = QEMU_AGENT_EVENT_SHUTDOWN;
ret = qemuAgentCommand(mon, cmd, &reply,
- VIR_DOMAIN_QEMU_AGENT_COMMAND_DEFAULT);
+ VIR_DOMAIN_QEMU_AGENT_COMMAND_BLOCK);
if (reply && ret == 0)
ret = qemuAgentCheckError(cmd, reply);
@@ -1329,7 +1329,7 @@ int qemuAgentFSFreeze(qemuAgentPtr mon)
return -1;
if (qemuAgentCommand(mon, cmd, &reply,
- VIR_DOMAIN_QEMU_AGENT_COMMAND_DEFAULT) < 0 ||
+ VIR_DOMAIN_QEMU_AGENT_COMMAND_BLOCK) < 0 ||
qemuAgentCheckError(cmd, reply) < 0)
goto cleanup;
@@ -1367,7 +1367,7 @@ int qemuAgentFSThaw(qemuAgentPtr mon)
return -1;
if (qemuAgentCommand(mon, cmd, &reply,
- VIR_DOMAIN_QEMU_AGENT_COMMAND_DEFAULT) < 0 ||
+ VIR_DOMAIN_QEMU_AGENT_COMMAND_BLOCK) < 0 ||
qemuAgentCheckError(cmd, reply) < 0)
goto cleanup;
@@ -1405,7 +1405,7 @@ qemuAgentSuspend(qemuAgentPtr mon,
mon->await_event = QEMU_AGENT_EVENT_SUSPEND;
ret = qemuAgentCommand(mon, cmd, &reply,
- VIR_DOMAIN_QEMU_AGENT_COMMAND_DEFAULT);
+ VIR_DOMAIN_QEMU_AGENT_COMMAND_BLOCK);
if (reply && ret == 0)
ret = qemuAgentCheckError(cmd, reply);
ACK
Michal