Re: [Spice-devel] [PATCH spice-server] Minor compatibility with FreeBSD system

2018-01-15 Thread Christophe Fergeau
Hey, Might have been worth splitting this a bit. Regardless of that, looks goodh to me, Acked-by: Christophe Fergeau On Wed, Jan 10, 2018 at 08:51:16AM +, Frediano Ziglio wrote: > Some additional header are needed to avoid undefined types. > SOL_TCP and IPPROTO_TCP have the same value in Lin

Re: [Spice-devel] virt-viewer on win10 32bit abort when pulling outthe USB

2018-01-15 Thread Sameeh Jubran
On Mon, Jan 15, 2018 at 3:40 AM, 王杰东 wrote: > Firstly, I installed UsbDk 1.0.19 and VirtViewer 6.0.256 , then i tried > UsbDk 1.0.17 and VirtViewer 5.0.256 . > and i tried Sandisk and Kingston usb device , all of these aborted . > But i never install libusb additionally , only find libusb-1.0.dll

[Spice-devel] [PATCH spice-server v4 4/4] stream-device: Implements properly device reset on open/close

2018-01-15 Thread Frediano Ziglio
Due to the way Qemu handle the device we must consume all pending data inside the callback to read data from the device. We need to consume all data from previous device dialog to avoid that next device usage is still seeing old data. This as Qemu return 0 if you call SpiceCharDeviceInterface::read

[Spice-devel] [PATCH spice-server v4 0/4] Better handling reset for streaming device

2018-01-15 Thread Frediano Ziglio
Changes since v3: - add a test case. Changes since v2: - split first patch between fix and test; - better wording (not code changes). Frediano Ziglio (4): stream-device: Avoid device to get stuck if multiple messages are batched test-stream-device: Better Qemu emulation for data reading

[Spice-devel] [PATCH spice-server v4 2/4] test-stream-device: Better Qemu emulation for data reading

2018-01-15 Thread Frediano Ziglio
Qemu does not trigger a new data read if we don't read all data in the buffer. Signed-off-by: Frediano Ziglio --- server/tests/test-stream-device.c | 43 +-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/server/tests/test-stream-device.c b/se

[Spice-devel] [PATCH spice-server v4 1/4] stream-device: Avoid device to get stuck if multiple messages are batched

2018-01-15 Thread Frediano Ziglio
If messages are sent together by the agent the device is reading only part of the data. This cause Qemu to not poll for new data and stream_device_read_msg_from_dev won't be called again. This can cause a stall. To avoid this continue handling data after a full message was processed. Signed-off-by

[Spice-devel] [PATCH spice-server v4 3/4] test-stream-device: Test batched multiple messages

2018-01-15 Thread Frediano Ziglio
Test all batched (send together) messages are handled correctly and device is not stuck. Signed-off-by: Frediano Ziglio --- server/tests/test-stream-device.c | 36 1 file changed, 36 insertions(+) diff --git a/server/tests/test-stream-device.c b/server/test