Re: [Spice-devel] [spice-gtk] If replace me, should nod do refcount plus one

2018-07-13 Thread Frediano Ziglio
> > > > > From: 乐义华 > > > > https://gitlab.freedesktop.org/spice/spice-gtk/issues/72 > > --- > > src/channel-display.c | 5 - > > src/spice-channel-cache.h | 8 > > 2 files changed, 12 insertions(+), 1 deletion(-) > > > > diff --git a/src/channel-display.c b/src/channel-displ

[Spice-devel] [PATCH spice-server 1/5] red-stream-device: Fix and check empty data messages

2018-07-13 Thread Frediano Ziglio
If guest sent an empty data message this was not parsed correctly. Signed-off-by: Frediano Ziglio --- server/red-stream-device.c| 2 +- server/tests/test-stream-device.c | 18 +++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/server/red-stream-device.c b

[Spice-devel] [PATCH spice-server 4/5] test-stream-device: Factor out a function to start the test

2018-07-13 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/tests/test-stream-device.c | 63 +-- 1 file changed, 18 insertions(+), 45 deletions(-) diff --git a/server/tests/test-stream-device.c b/server/tests/test-stream-device.c index 6bd4127c5..1bcc1d42c 100644 --- a/server/tests/te

[Spice-devel] [PATCH spice-server 3/5] test-stream-device: Put common parts in setup/teardown functions

2018-07-13 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/tests/test-stream-device.c | 133 -- 1 file changed, 55 insertions(+), 78 deletions(-) diff --git a/server/tests/test-stream-device.c b/server/tests/test-stream-device.c index 781b45af9..6bd4127c5 100644 --- a/server/tests/te

[Spice-devel] [PATCH spice-server 0/5] Improve stream device test

2018-07-13 Thread Frediano Ziglio
Multiple test and improvement to test, also minor fix to the device itself. Frediano Ziglio (5): red-stream-device: Fix and check empty data messages test-stream-device: Check server detect and signal huge data test-stream-device: Put common parts in setup/teardown functions test-stream-de

[Spice-devel] [PATCH spice-server 5/5] test-stream-device: Check data are sent together

2018-07-13 Thread Frediano Ziglio
Check that data sent to device are collapsed in a single message. The StreamChannel object is mocked in the test. This checks that commit dcc3f995d9f5575e319adcfe530c477a7c294ff3 ("stream-device: handle_data: send whole message") is doing the right thing. Signed-off-by: Frediano Ziglio --- serve

[Spice-devel] [PATCH spice-server 2/5] test-stream-device: Check server detect and signal huge data

2018-07-13 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/tests/test-stream-device.c | 41 ++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/server/tests/test-stream-device.c b/server/tests/test-stream-device.c index ae9a78da5..781b45af9 100644 --- a/server/tests/test

Re: [Spice-devel] [PATCH spice-server] reds: Free device chain in spice_server_destroy to avoid leaks

2018-07-13 Thread Christophe Fergeau
On Wed, Jul 11, 2018 at 05:30:25PM +0100, Frediano Ziglio wrote: > Leak detectors did not manage to find leaks, possibly as double list > have all elements likely with a pointer to them. > The reference from the agent is necessary for inserting it into > the list. > > Signed-off-by: Frediano Zigli

Re: [Spice-devel] [PATCH spice-server] reds: Free device chain in spice_server_destroy to avoid leaks

2018-07-13 Thread Frediano Ziglio
> > On 11/07/18 13:30, Frediano Ziglio wrote: > > Leak detectors did not manage to find leaks, possibly as double list > > have all elements likely with a pointer to them. > > The reference from the agent is necessary for inserting it into > > the list. > > > > Signed-off-by: Frediano Ziglio > >

Re: [Spice-devel] [spice-gtk] If replace me, should nod do refcount plus one

2018-07-13 Thread Frediano Ziglio
> > From: 乐义华 > > https://gitlab.freedesktop.org/spice/spice-gtk/issues/72 > --- > src/channel-display.c | 5 - > src/spice-channel-cache.h | 8 > 2 files changed, 12 insertions(+), 1 deletion(-) > > diff --git a/src/channel-display.c b/src/channel-display.c > index 44ba043..1