From 7444ccce4cb4af1ce61eb4c2c9ce4f69ea276e9c Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Thu, 30 Aug 2012 14:40:01 +0200 Subject: [PATCH] qemu: Revert to blocking behavior of qemuAgentCommand 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 6a7a0b4628..51e60d21e3 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); -- GitLab