]> git.proxmox.com Git - mirror_qemu.git/commit
qtest: allow arbitrarily long sends
authorJohn Snow <jsnow@redhat.com>
Fri, 22 May 2015 18:13:43 +0000 (14:13 -0400)
committerJohn Snow <jsnow@redhat.com>
Fri, 22 May 2015 19:58:22 +0000 (15:58 -0400)
commit332cc7e9b39ddb2feacb4c71dcd18c3e5b0c3147
tree339da2a4216356845ecfa15d8abc185e21c168db
parent5d1cf0917b4f1282ac81bb72697713d14c98a876
qtest: allow arbitrarily long sends

qtest currently has a static buffer of size 1024 that if we
overflow, ignores the additional data silently which leads
to hangs or stream failures.

Use glib's string facilities to allow arbitrarily long data,
but split this off into a new function, qtest_sendf.

Static data can still be sent using qtest_send, which avoids
the malloc/copy overhead.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1430864578-22072-2-git-send-email-jsnow@redhat.com
qtest.c