On Thu, Dec 07, 2017 at 08:47:38AM +0000, Frediano Ziglio wrote: > Qemu does not trigger a new data read if we don't read all data in > the buffer. > > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> > --- > server/stream-device.c | 9 ++++++++ > server/tests/test-stream-device.c | 43 +++++++++++++++++++++++++++++++++++++-- > 2 files changed, 50 insertions(+), 2 deletions(-) > > Changes since v1: > - avoid an inifinite loop, test added. > > diff --git a/server/stream-device.c b/server/stream-device.c > index 4eaa959b..897fc665 100644 > --- a/server/stream-device.c > +++ b/server/stream-device.c > @@ -123,6 +123,15 @@ stream_device_read_msg_from_dev(RedCharDevice *self, SpiceCharDeviceInstance *si > dev->hdr_pos = 0; > } > > + if (handled || dev->has_error) { > + // Qemu put the device on blocking state if we don't read all data > + // so schedule another read. > + // We arrive here if we processed that entire message or we > + // got an error, try to read another message or discard the > + // wrong data > + red_char_device_wakeup(self); > + } > + This is supposed to be a commit changing test-stream-device.c, but there is this hunk in server/stream-device.c, is it intentional that it's there? Christophe
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel