On 07/30/2013 07:05 AM, Peter Krempa wrote:
Although this isn't apparently needed for the guest agent itself,
the
test I will be adding later depends on the newline as a separator of
messages to process.
Agreed - absence of whitespace like newlines is inconsequential in
strict JSON, but using it to simplify tests is worthwhile; it also makes
it easier to see what is sent across a line when tracing debug messages.
---
src/qemu/qemu_agent.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ACK.
diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index 72bf211..1607e88 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -918,7 +918,7 @@ qemuAgentGuestSync(qemuAgentPtr mon)
if (virAsprintf(&sync_msg.txBuffer,
"{\"execute\":\"guest-sync\", "
- "\"arguments\":{\"id\":%llu}}", id)
< 0)
+ "\"arguments\":{\"id\":%llu}}\n", id)
< 0)
return -1;
sync_msg.txLength = strlen(sync_msg.txBuffer);
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org