[libvirt] [PATCH 02/20] qemu_agent: Output newline at the end of the sync JSON message
Eric Blake
eblake at redhat.com
Tue Jul 30 13:21:16 UTC 2013
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130730/62b8b1df/attachment-0001.sig>
More information about the libvir-list
mailing list