Re: [Spice-devel] [PATCH spice-server 10/30] Move RedsWebSocket to header

2016-11-25 Thread Frediano Ziglio
> > On Thu, 2016-11-24 at 11:12 -0500, Frediano Ziglio wrote: > > > > > > Hi Frediano, > > > > > > Thanks for the review, and all the hard work to tighten the code. > > > > > > I've reviewed all 30 patches, and have done a quick dry run test, > > > and it > > > still seems to work for my use

[Spice-devel] [PATCH v2 15/19] replay: Free spice server to detect leaks

2016-11-25 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/tests/replay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/tests/replay.c b/server/tests/replay.c index f32fa2f..23d4125 100644 --- a/server/tests/replay.c +++ b/server/tests/replay.c @@ -221,7 +221,6 @@

[Spice-devel] [PATCH v2 08/19] Remove unused red_channel_get_first_socket

2016-11-25 Thread Frediano Ziglio
This function assume there is only one client. Was used only by some obsolete functions. Avoid to use such function in the future. Signed-off-by: Frediano Ziglio --- server/red-channel.c | 14 -- server/red-channel.h | 2 -- 2 files changed, 16 deletions(-)

[Spice-devel] [PATCH v2 10/19] Reuse reds_core_timer_add

2016-11-25 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/main-channel-client.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/main-channel-client.c b/server/main-channel-client.c index 987f260..576b31f 100644 --- a/server/main-channel-client.c +++

[Spice-devel] [PATCH v2 11/19] Add red_qxl_destroy function

2016-11-25 Thread Frediano Ziglio
Allows to destroy a QXL object Signed-off-by: Frediano Ziglio --- server/red-qxl.c| 25 ++--- server/red-qxl.h| 1 + server/red-worker.c | 35 ++- server/red-worker.h | 1 + 4 files changed, 58 insertions(+), 4

[Spice-devel] [PATCH v2 07/19] Return invalid value from very old obsolete functions

2016-11-25 Thread Frediano Ziglio
These functions are not used since years and are not supporting multiple clients. Signed-off-by: Frediano Ziglio --- server/main-channel.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/main-channel.c b/server/main-channel.c index

[Spice-devel] [PATCH v2 04/19] Use red_channel_destroy to free main_channel

2016-11-25 Thread Frediano Ziglio
This will close all clients and release the channel properly Signed-off-by: Frediano Ziglio --- server/reds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/reds.c b/server/reds.c index c5e84ec..1a812e4 100644 --- a/server/reds.c +++

[Spice-devel] [PATCH v2 01/19] red_worker: add RED_WORKER_MESSAGE_CLOSE_WORKER message

2016-11-25 Thread Frediano Ziglio
Allows to close worker thread. This will be used to destroy cleanly CursorChannel and DisplayChannel. CursorChannel and DisplayChannel are run in a different thread. However deregistration of channels and different steps of destruction should be done in the same thread so this make possible to

[Spice-devel] [PATCH v2 18/19] Free replay queues

2016-11-25 Thread Frediano Ziglio
There could be still some data pending. Signed-off-by: Frediano Ziglio --- server/tests/replay.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/server/tests/replay.c b/server/tests/replay.c index 23d4125..8ec65d6 100644 ---

[Spice-devel] [PATCH v2 05/19] Do not leak mig_timer

2016-11-25 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/reds.c | 4 1 file changed, 4 insertions(+) diff --git a/server/reds.c b/server/reds.c index 1a812e4..bc0cc01 100644 --- a/server/reds.c +++ b/server/reds.c @@ -3594,6 +3594,10 @@ SPICE_GNUC_VISIBLE void

[Spice-devel] [PATCH v2 16/19] cursor: Avoid cursor item leak

2016-11-25 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/cursor-channel.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/server/cursor-channel.c b/server/cursor-channel.c index 202ec89..e421bf7 100644 --- a/server/cursor-channel.c +++ b/server/cursor-channel.c @@

[Spice-devel] [PATCH v2 17/19] Allows reds_core_timer_remove to accept NULL for timer

2016-11-25 Thread Frediano Ziglio
Most of the times the check is done externally so moving inside the function reduce the code. This is similar to the way free(3) works. Signed-off-by: Frediano Ziglio --- server/char-device.c | 20 server/inputs-channel.c | 5 ++---

[Spice-devel] [PATCH v2 00/19] Start cleaning objects on destruction

2016-11-25 Thread Frediano Ziglio
These patches start destroying objects upon destruction. Lot of the objects are just allocated but never freed. This however make hardier to understand automatically leaks as objects are still linked together. Currently spice_server_destroy is not called so objects are freed only when program ends

[Spice-devel] [PATCH v2 19/19] Free properly primary surface during replay

2016-11-25 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/red-replay-qxl.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c index 2176068..aeaa545 100644 --- a/server/red-replay-qxl.c +++ b/server/red-replay-qxl.c @@ -48,6 +48,7 @@

[Spice-devel] [PATCH v2 03/19] Free state on spice_server_destroy

2016-11-25 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/reds.c | 1 + 1 file changed, 1 insertion(+) diff --git a/server/reds.c b/server/reds.c index 1b1c737..c5e84ec 100644 --- a/server/reds.c +++ b/server/reds.c @@ -3603,6 +3603,7 @@ SPICE_GNUC_VISIBLE void

[Spice-devel] [PATCH v2 14/19] Free QXL instances in spice_server_destroy

2016-11-25 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/reds.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/server/reds.c b/server/reds.c index 701aed6..553e7a8 100644 --- a/server/reds.c +++ b/server/reds.c @@ -3599,6 +3599,8 @@ SPICE_GNUC_VISIBLE void

[Spice-devel] [PATCH v2 13/19] Rearrange object destruction

2016-11-25 Thread Frediano Ziglio
Try to arrange destruction in the opposite order of the creation Signed-off-by: Frediano Ziglio --- server/display-channel.c | 4 ++-- server/reds.c| 28 2 files changed, 18 insertions(+), 14 deletions(-) diff --git

[Spice-devel] [PATCH v2 12/19] Support QXL remove on spice_server_remove_interface

2016-11-25 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/reds.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/server/reds.c b/server/reds.c index bc0cc01..05afb7c 100644 --- a/server/reds.c +++ b/server/reds.c @@ -3321,6 +3321,13 @@ SPICE_GNUC_VISIBLE int

[Spice-devel] [PATCH v2 06/19] Remove unused and obsolete main_channel_close

2016-11-25 Thread Frediano Ziglio
This function wrongly close the first client. Wrongly as closing the file descriptor cause a dandling file descriptor in the object potentially leading to closing another file descriptor open later. Signed-off-by: Frediano Ziglio --- server/main-channel.c | 10 --

[Spice-devel] [PATCH v2 09/19] Avoid to leak timer in InputsChannel

2016-11-25 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/inputs-channel.c | 13 + 1 file changed, 13 insertions(+) diff --git a/server/inputs-channel.c b/server/inputs-channel.c index 7c397a4..99c2888 100644 --- a/server/inputs-channel.c +++ b/server/inputs-channel.c @@ -620,6

[Spice-devel] [PATCH v2 02/19] Free statistic file on spice_server_destroy

2016-11-25 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/reds.c | 4 server/stat-file.c| 17 + server/stat-file.h| 1 + server/tests/test-stat-file.c | 2 ++ 4 files changed, 24 insertions(+) diff --git a/server/reds.c

Re: [Spice-devel] [PATCH spice-server 02/20] red_worker: add RED_WORKER_MESSAGE_CLOSE_WORKER message

2016-11-25 Thread Pavel Grunt
maybe red-worker: Add way for closing main thread ..and it would be nice to have some description of what is actually going on with the new message - when it should be sent, how is handled etc On Thu, 2016-11-24 at 17:38 +, Frediano Ziglio wrote: > Allows to close main thread. > For the

[Spice-devel] [PATCH spice] Move memslot_get_generation() from the header

2016-11-25 Thread Pavel Grunt
It is used in memslot.c only. It was moved to header in 34fb3f680618b8735322462bd692fb2923ea3027 --- server/memslot.c | 5 + server/memslot.h | 5 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/memslot.c b/server/memslot.c index fdcd023..53ef45d 100644 ---

Re: [Spice-devel] [PATCH spice-common v3] spice-deps: Make LZ4 check depending on function

2016-11-25 Thread Frediano Ziglio
> > LZ4 changed versioning scheme from r131 to v1.7.3 making our configure > fail with (1.7.3 < 129). > > Switch from version checking to checking that the necessary function > is available. > --- > m4/spice-deps.m4 | 22 ++ > 1 file changed, 18 insertions(+), 4 deletions(-)

Re: [Spice-devel] [PATCH spice-server 01/20] add a red_memslot_info_destroy function

2016-11-25 Thread Pavel Grunt
I prefer commits where a symbol is introduced and used. In this case the destroy function can be used in the qxl parsing test. Ack with ^ Pavel On Thu, 2016-11-24 at 17:38 +, Frediano Ziglio wrote: > Allows to free RedMemSlotInfo structure > > Signed-off-by: Frediano Ziglio

Re: [Spice-devel] [PATCH spice-server v2] tests: Normalize test names

2016-11-25 Thread Pavel Grunt
On Fri, 2016-11-25 at 13:12 +, Frediano Ziglio wrote: > Use dash instead of underscores for file names. This is coherent > with rest of file names. > Rename all tests to test-XXX and remove the spice- prefix when > present. This is coherent with most of the tests. > > Signed-off-by: Frediano

[Spice-devel] [PATCH spice-server v2] tests: Normalize test names

2016-11-25 Thread Frediano Ziglio
Use dash instead of underscores for file names. This is coherent with rest of file names. Rename all tests to test-XXX and remove the spice- prefix when present. This is coherent with most of the tests. Signed-off-by: Frediano Ziglio --- cfg.mk

Re: [Spice-devel] [PATCH spice-server] tests: Normalize test names

2016-11-25 Thread Pavel Grunt
On Fri, 2016-11-25 at 07:49 -0500, Frediano Ziglio wrote: > > > > On Thu, 2016-11-24 at 16:42 +, Frediano Ziglio wrote: > > > Use dash instead of underscores for file names. This is coherent > > > with rest of file names. > > > > This should apply also to regression_test.py and

Re: [Spice-devel] [PATCH spice-server] tests: Normalize test names

2016-11-25 Thread Frediano Ziglio
> > On Thu, 2016-11-24 at 16:42 +, Frediano Ziglio wrote: > > Use dash instead of underscores for file names. This is coherent > > with rest of file names. > This should apply also to regression_test.py and test_multiple.py > I'll do. > > Rename all tests to test-XXX and remove the spice-

Re: [Spice-devel] [PATCH spice-server 15/20] Free QXL instances in spice_server_destroy

2016-11-25 Thread Pavel Grunt
make check fails since this one. The reason is that reds- >main_dispatcher can be NULL in case do_spice_init() wasn't called. Pavel On Thu, 2016-11-24 at 17:39 +, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- >  server/reds.c | 5 + >  1 file changed,

Re: [Spice-devel] [vdagent-linux] x11: More udscs_read_callback memory ownership issues

2016-11-25 Thread Pavel Grunt
On Thu, 2016-11-24 at 16:57 +0100, Christophe Fergeau wrote: > This time it's vdagent_x11_clipboard_data() which is called from > daemon_read_complete() which was missed and which was still freeing > data > it no longer owns. > > This fixes https://bugs.freedesktop.org/show_bug.cgi?id=98830 Ack

[Spice-devel] [PATCH spice-common v3] spice-deps: Make LZ4 check depending on function

2016-11-25 Thread Pavel Grunt
LZ4 changed versioning scheme from r131 to v1.7.3 making our configure fail with (1.7.3 < 129). Switch from version checking to checking that the necessary function is available. --- m4/spice-deps.m4 | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git

Re: [Spice-devel] [PATCH spice-server 10/30] Move RedsWebSocket to header

2016-11-25 Thread Pavel Grunt
On Thu, 2016-11-24 at 11:12 -0500, Frediano Ziglio wrote: > > > > Hi Frediano, > > > > Thanks for the review, and all the hard work to tighten the code. > > > > I've reviewed all 30 patches, and have done a quick dry run test, > > and it > > still seems to work for my use case - thanks! > > >

Re: [Spice-devel] [vdagent-linux] udscs: Fix memory ownership issues with udscs_read_callback

2016-11-25 Thread Christophe Fergeau
On Fri, Nov 25, 2016 at 05:54:56AM +0100, Francois Gouget wrote: > > Thanks for this patch, I think it makes the code more consistent and > cleaner. While rechecking this I think I found a wrinkle though: > > > On Wed, 9 Nov 2016, Christophe Fergeau wrote: > [...] > > diff --git a/src/udscs.c

Re: [Spice-devel] [PATCH spice-server] tests: Normalize test names

2016-11-25 Thread Pavel Grunt
On Thu, 2016-11-24 at 16:42 +, Frediano Ziglio wrote: > Use dash instead of underscores for file names. This is coherent > with rest of file names. This should apply also to regression_test.py and test_multiple.py > Rename all tests to test-XXX and remove the spice- prefix when > present.

Re: [Spice-devel] Processing of rendering operations in separate thread

2016-11-25 Thread Javier Celaya
Hello Yuri El vie, 25-11-2016 a las 01:08 +0200, Yuri Benditovich escribió: > I'm porting to [qxl-wddm-dod] set of flexvdi changes > related to execution of 'present display only' events > in separate thread. There are 2 questions below I'd like to ask and > know your opinion. > > I see there 2