Re: [Spice-devel] [spice-gtk v1] channel-main: demote log level from warning to debug

2016-12-01 Thread Christophe Fergeau
On Thu, Dec 01, 2016 at 02:15:49PM +0100, Victor Toso wrote: > On Thu, Dec 01, 2016 at 11:37:32AM +0100, Christophe Fergeau wrote: > > On Wed, Nov 30, 2016 at 06:50:39PM +0100, Victor Toso wrote: > > > From: Victor Toso > > > > > > Failing to get playback or record volume

Re: [Spice-devel] [PATCH spice-server] gstreamer: Correctly don't allow too limited bit rates

2016-12-01 Thread Francois Gouget
On Thu, 1 Dec 2016, Frediano Ziglio wrote: > The check to limit too low bit rates was setting encoder->bit_rate > instead of bit_rate. However after some lines bit_rate was used > to set encoder->bit_rate basically removing the lower threshold. > > Signed-off-by: Frediano Ziglio

[Spice-devel] [spice-gtk v3] channel-usbredir: prevent crash when calling without host

2016-12-01 Thread Victor Toso
From: Victor Toso As spice_usbredir_channel_up() can be called when channel-usbredir is not yet initialized, priv->host can be NULL leading to a crash in usbredir. See previous patch that does initialize SpiceUsbDeviceManager on SpiceSession init and also the comment in

Re: [Spice-devel] [spice-gtk v2 1/2] channel-usbredir: Fix crash on channel-up

2016-12-01 Thread Victor Toso
Hi, On Thu, Dec 01, 2016 at 01:29:50PM +0100, Christophe Fergeau wrote: > On Wed, Nov 30, 2016 at 06:36:32PM +0100, Victor Toso wrote: > > From: Victor Toso > > > > SpiceSession does not initialize its SpiceUsbDeviceManager object on > > startup that could lead to a race

Re: [Spice-devel] udscs: Fix a potential NULL pointer dereference

2016-12-01 Thread Francois Gouget
On Thu, 1 Dec 2016, Christophe Fergeau wrote: > On Thu, Dec 01, 2016 at 05:19:33AM +0100, Francois Gouget wrote: > > udscs_server_fill_fds() should accept being passed a NULL pointer. > > I would reword the commit log a bit, like "udscs_server_fill_fds() is > dereferencing the 'server' pointer,

Re: [Spice-devel] [spice-gtk v2 2/2] channel-usbredir: prevent crash when calling without host

2016-12-01 Thread Victor Toso
Hi, On Thu, Dec 01, 2016 at 01:33:56PM +0100, Christophe Fergeau wrote: > On Wed, Nov 30, 2016 at 06:57:12PM +0100, Victor Toso wrote: > > Hi, > > > > On Wed, Nov 30, 2016 at 06:45:45PM +0100, Pavel Grunt wrote: > > > imho this should be in usbredir > > > > > > It is not nice when library

Re: [Spice-devel] [PATCH v4 01/17] sound: Use worker directly

2016-12-01 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Thu, Dec 01, 2016 at 11:24:23AM +, Frediano Ziglio wrote: > SpicePlaybackState and SpiceRecordState have same structures > changing only slightly the behaviour. > Using SndWorker instead allows some minor simplification and > more code

Re: [Spice-devel] [spice-gtk v1] channel-main: demote log level from warning to debug

2016-12-01 Thread Christophe Fergeau
On Thu, Dec 01, 2016 at 05:06:42PM +0100, Victor Toso wrote: > Hi, > > On Thu, Dec 01, 2016 at 04:33:36PM +0100, Christophe Fergeau wrote: > > On Thu, Dec 01, 2016 at 02:15:49PM +0100, Victor Toso wrote: > > > On Thu, Dec 01, 2016 at 11:37:32AM +0100, Christophe Fergeau wrote: > > > > On Wed, Nov

Re: [Spice-devel] [spice-gtk v1] channel-main: demote log level from warning to debug

2016-12-01 Thread Victor Toso
Hi, On Thu, Dec 01, 2016 at 06:17:41PM +0200, Uri Lublin wrote: > On 11/30/2016 07:50 PM, Victor Toso wrote: > > From: Victor Toso > > > > Failing to get playback or record volume async on startup is very > > common making this warning too worrisome for users. > > > > If the

Re: [Spice-devel] [PATCH v4 04/17] sound: Rename SndWorker to SndChannel

2016-12-01 Thread Frediano Ziglio
> > On Thu, Dec 01, 2016 at 11:24:26AM +, Frediano Ziglio wrote: > > @@ -1506,73 +1506,73 @@ static void remove_worker(SndWorker *worker) > > > > void snd_attach_playback(RedsState *reds, SpicePlaybackInstance *sin) > > { > > -SndWorker *playback_worker; > > -RedChannel *channel;

Re: [Spice-devel] [spice-gtk v2 1/2] channel-usbredir: Fix crash on channel-up

2016-12-01 Thread Christophe Fergeau
On Thu, Dec 01, 2016 at 02:20:29PM +0100, Victor Toso wrote: > Hi, > > On Thu, Dec 01, 2016 at 01:29:50PM +0100, Christophe Fergeau wrote: > > On Wed, Nov 30, 2016 at 06:36:32PM +0100, Victor Toso wrote: > > > From: Victor Toso > > > > > > SpiceSession does not initialize

Re: [Spice-devel] [PATCH v4 02/17] sound: Rename SndChannel to SndChannelClient

2016-12-01 Thread Christophe Fergeau
On Thu, Dec 01, 2016 at 11:24:24AM +, Frediano Ziglio wrote: > SndWorker has been historically based on RedChannel, initial git commit > has: > struct SndWorker { > Channel base; > ... > }; > > SndChannel, contrary to what its name may imply is more focused on > marshalling/sending

Re: [Spice-devel] [PATCH v4 04/17] sound: Rename SndWorker to SndChannel

2016-12-01 Thread Christophe Fergeau
On Thu, Dec 01, 2016 at 11:47:15AM -0500, Frediano Ziglio wrote: > > > > On Thu, Dec 01, 2016 at 11:24:26AM +, Frediano Ziglio wrote: > > > @@ -1506,73 +1506,73 @@ static void remove_worker(SndWorker *worker) > > > > > > void snd_attach_playback(RedsState *reds, SpicePlaybackInstance *sin)

Re: [Spice-devel] [PATCH spice-server] Add a comment to red_channel_client_init_send_data

2016-12-01 Thread Jonathon Jongsma
On Thu, 2016-11-24 at 08:57 -0500, Frediano Ziglio wrote: > >  > >  > > On Thu, Nov 24, 2016 at 10:48:24AM +, Frediano Ziglio wrote: > > >  > > > Signed-off-by: Frediano Ziglio > > > --- > > >  server/red-channel-client.h | 3 +++ > > >  1 file changed, 3 insertions(+) > >

Re: [Spice-devel] [PATCH v4 03/17] sound: Rename {Record, Playback}Channel to *ChannelClient

2016-12-01 Thread Christophe Fergeau
On Thu, Dec 01, 2016 at 11:24:25AM +, Frediano Ziglio wrote: > Make easier to understand that they refer to client and not > all channel. > > Specifically: > - RecordChannel -> RecordChannelClient > - PlaybackChannel -> PlaybackChannelClient > - playback_channel -> playback_client > -

Re: [Spice-devel] [PATCH v4 04/17] sound: Rename SndWorker to SndChannel

2016-12-01 Thread Christophe Fergeau
On Thu, Dec 01, 2016 at 11:24:26AM +, Frediano Ziglio wrote: > @@ -1506,73 +1506,73 @@ static void remove_worker(SndWorker *worker) > > void snd_attach_playback(RedsState *reds, SpicePlaybackInstance *sin) > { > -SndWorker *playback_worker; > -RedChannel *channel; > +SndChannel

Re: [Spice-devel] [PATCH v4 07/17] sound: Convert SndChannelClient to GObject

2016-12-01 Thread Christophe Fergeau
On Thu, Dec 01, 2016 at 11:24:29AM +, Frediano Ziglio wrote: > This patch is quite huge but have some benefits: > - reduce dependency (DummyChannel* and some RedChannelClient internals); > - reuse RedChannelClient instead of reading from the RedsStream > directly. > > You can see that

Re: [Spice-devel] [PATCH v4 00/17] Remove DummyChannel* objects

2016-12-01 Thread Jonathon Jongsma
I'm a little bit confused. This appears to be the third patch series that is designated "v4". That means this should actually be v6, no? (although the previous series was sent exactly 1 minute before this one, so maybe they're the same?) On Thu, 2016-12-01 at 11:24 +, Frediano Ziglio wrote:

Re: [Spice-devel] [PATCH v4 04/17] sound: Rename SndWorker to SndChannel

2016-12-01 Thread Jonathon Jongsma
On Thu, 2016-12-01 at 11:24 +, Frediano Ziglio wrote: > SndWorker has been historically based on RedChannel, initial git > commit > has: > struct SndWorker { >  Channel base; >  ... > }; I'd add a short note to the commit log explaining that this is only possible since we just

Re: [Spice-devel] [PATCH v4 05/17] sound: Convert SndChannel to GObject

2016-12-01 Thread Jonathon Jongsma
On Thu, 2016-12-01 at 11:24 +, Frediano Ziglio wrote: > Stops using the dummy channel. > Data handling still goes through DummyChannelClient which is why > empty implementation of some required vfuncs is working. > > Signed-off-by: Frediano Ziglio > --- >  server/sound.c

Re: [Spice-devel] [PATCH v4 06/17] sound: Implements config_socket RedChannel callback

2016-12-01 Thread Jonathon Jongsma
On Thu, 2016-12-01 at 11:24 +, Frediano Ziglio wrote: > This code is the same inside __new_channel but will set the > RedsStream from RedChannel. Shouldn't this code be removed from __new_channel() then? > > Signed-off-by: Frediano Ziglio > --- >  server/sound.c | 46

Re: [Spice-devel] [PATCH v4 07/17] sound: Convert SndChannelClient to GObject

2016-12-01 Thread Jonathon Jongsma
On Thu, 2016-12-01 at 17:21 +0100, Christophe Fergeau wrote: > On Thu, Dec 01, 2016 at 11:24:29AM +, Frediano Ziglio wrote: > > > > This patch is quite huge but have some benefits: > > - reduce dependency (DummyChannel* and some RedChannelClient > > internals); > > - reuse RedChannelClient

Re: [Spice-devel] [spice-gtk v1] channel-main: demote log level from warning to debug

2016-12-01 Thread Victor Toso
Hi, On Thu, Dec 01, 2016 at 04:33:36PM +0100, Christophe Fergeau wrote: > On Thu, Dec 01, 2016 at 02:15:49PM +0100, Victor Toso wrote: > > On Thu, Dec 01, 2016 at 11:37:32AM +0100, Christophe Fergeau wrote: > > > On Wed, Nov 30, 2016 at 06:50:39PM +0100, Victor Toso wrote: > > > > From: Victor

Re: [Spice-devel] [spice-gtk v1] channel-main: demote log level from warning to debug

2016-12-01 Thread Uri Lublin
On 11/30/2016 07:50 PM, Victor Toso wrote: From: Victor Toso Failing to get playback or record volume async on startup is very common making this warning too worrisome for users. If the audio back-end does not cache the last volume used or if this is the first time the

Re: [Spice-devel] [client v6 2/3] streaming: Stop streaming if frames cannot be decoded

2016-12-01 Thread Victor Toso
Hi, On Tue, Nov 22, 2016 at 06:01:38PM +0100, Francois Gouget wrote: > Report the stream as invalid if the frames cannot be decoded. This will > force the server to send regular screen updates instead. > > Signed-off-by: Francois Gouget > --- > > Uses

Re: [Spice-devel] [spice v6 3/3] streaming: Stop streaming if the client reports a streaming error

2016-12-01 Thread Victor Toso
Hi! On Tue, Nov 22, 2016 at 06:01:48PM +0100, Francois Gouget wrote: > By removing the stream's video encoder we force the stream to send > future frames using the fallback code, that is as regular screen > updates. > However note that we keep the stream object: we have to. Otherwise > future

Re: [Spice-devel] [client v2 3/3] build-sys: Enable deprecation warnings instead of ignoring them entirely

2016-12-01 Thread Christophe Fergeau
On Thu, Dec 01, 2016 at 04:27:36AM +0100, Francois Gouget wrote: > On Wed, 23 Nov 2016, Christophe Fergeau wrote: > > > On Wed, Nov 23, 2016 at 07:09:28AM +0100, Francois Gouget wrote: > > > For Spice-gtk most deprecation issues come from changes outside Spice > > > (GLib) and thus should not be

Re: [Spice-devel] [client v2 3/3] build-sys: Enable deprecation warnings instead of ignoring them entirely

2016-12-01 Thread Christophe Fergeau
On Thu, Dec 01, 2016 at 04:27:36AM +0100, Francois Gouget wrote: > > > > Btw, what's the status of this patchset? Fine with me, I'll add a closing G_END_DEPRECATION_xxx to the end of spicy.c and push. This adds a few more warnings in various places, but they can be fixed afterwards (though I

Re: [Spice-devel] [client v2 2/3] spicy: Temporarily ignore deprecation warnings

2016-12-01 Thread Christophe Fergeau
I think I'd handle this one similarly to the vala warnings: diff --git a/src/Makefile.am b/src/Makefile.am index 3f81866..66e3c64 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -402,10 +402,12 @@ spicy_LDADD = \ $(LIBM)

[Spice-devel] [PATCH spice-server] gstreamer: Correctly don't allow too limited bit rates

2016-12-01 Thread Frediano Ziglio
The check to limit too low bit rates was setting encoder->bit_rate instead of bit_rate. However after some lines bit_rate was used to set encoder->bit_rate basically removing the lower threshold. Signed-off-by: Frediano Ziglio --- server/gstreamer-encoder.c | 2 +- 1 file

Re: [Spice-devel] [spice-gtk v2 1/2] channel-usbredir: Fix crash on channel-up

2016-12-01 Thread Christophe Fergeau
On Wed, Nov 30, 2016 at 06:36:32PM +0100, Victor Toso wrote: > From: Victor Toso > > SpiceSession does not initialize its SpiceUsbDeviceManager object on > startup that could lead to a race condition where channel-usbredir is > requested to flush data while it is

Re: [Spice-devel] [spice-gtk v2 2/2] channel-usbredir: prevent crash when calling without host

2016-12-01 Thread Christophe Fergeau
On Wed, Nov 30, 2016 at 06:57:12PM +0100, Victor Toso wrote: > Hi, > > On Wed, Nov 30, 2016 at 06:45:45PM +0100, Pavel Grunt wrote: > > imho this should be in usbredir > > > > It is not nice when library crashes your program > > I don't disagree. Libraries should use guards accordingly. > > But

Re: [Spice-devel] [spice-gtk v2 2/2] channel-usbredir: prevent crash when calling without host

2016-12-01 Thread Christophe Fergeau
On Wed, Nov 30, 2016 at 06:36:33PM +0100, Victor Toso wrote: > From: Victor Toso > > Similar fix was done in 5b252b0f499601bcf387c02a4dd35d27ed34c > > We should log a critical message instead of crashing the application. I think the log should be more detailed than in the

[Spice-devel] [PATCH v4 00/17] Remove DummyChannel* objects

2016-12-01 Thread Frediano Ziglio
These objects were used by the sound channel as this channel read/write to/from client directly. This make the code of this channel quite different from the other ones. Also this reduce code duplication from RedChannelClient and increase encapsulation. First set of patches attempt to rename

[Spice-devel] [PATCH v4 09/17] Make RedChannelClient::incoming private

2016-12-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/red-channel-client-private.h | 11 +++ server/red-channel-client.c | 12 ++-- server/red-channel-client.h | 13 - 3 files changed, 17 insertions(+), 19 deletions(-) diff --git

[Spice-devel] [PATCH v4 07/17] sound: Convert SndChannelClient to GObject

2016-12-01 Thread Frediano Ziglio
This patch is quite huge but have some benefits: - reduce dependency (DummyChannel* and some RedChannelClient internals); - reuse RedChannelClient instead of reading from the RedsStream directly. You can see that SndChannelClient has much less field as the code to read/write from/to client is

[Spice-devel] [PATCH v4 10/17] sound: Free more on SndChannel finalize

2016-12-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/sound.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/server/sound.c b/server/sound.c index 14a6997..ebbe821 100644 --- a/server/sound.c +++ b/server/sound.c @@ -1425,10 +1425,26 @@

[Spice-devel] [PATCH v4 06/17] sound: Implements config_socket RedChannel callback

2016-12-01 Thread Frediano Ziglio
This code is the same inside __new_channel but will set the RedsStream from RedChannel. Signed-off-by: Frediano Ziglio --- server/sound.c | 46 +- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/server/sound.c

[Spice-devel] [PATCH v4 10/17] sound: Free more on SndChannel finalize

2016-12-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/sound.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/server/sound.c b/server/sound.c index 14a6997..ebbe821 100644 --- a/server/sound.c +++ b/server/sound.c @@ -1425,10 +1425,26 @@

[Spice-devel] [PATCH v4 04/17] sound: Rename SndWorker to SndChannel

2016-12-01 Thread Frediano Ziglio
SndWorker has been historically based on RedChannel, initial git commit has: struct SndWorker { Channel base; ... }; Signed-off-by: Frediano Ziglio --- server/sound.c | 312 +- 1 file changed, 156 insertions(+), 156

[Spice-devel] [PATCH v4 04/17] sound: Rename SndWorker to SndChannel

2016-12-01 Thread Frediano Ziglio
SndWorker has been historically based on RedChannel, initial git commit has: struct SndWorker { Channel base; ... }; Signed-off-by: Frediano Ziglio --- server/sound.c | 312 +- 1 file changed, 156 insertions(+), 156

[Spice-devel] [PATCH v4 02/17] sound: Rename SndChannel to SndChannelClient

2016-12-01 Thread Frediano Ziglio
SndWorker has been historically based on RedChannel, initial git commit has: struct SndWorker { Channel base; ... }; SndChannel, contrary to what its name may imply is more focused on marshalling/sending of sound data, which is the responsibility of RedChannelClient for the other SPICE

[Spice-devel] [PATCH v4 07/17] sound: Convert SndChannelClient to GObject

2016-12-01 Thread Frediano Ziglio
This patch is quite huge but have some benefits: - reduce dependency (DummyChannel* and some RedChannelClient internals); - reuse RedChannelClient instead of reading from the RedsStream directly. You can see that SndChannelClient has much less field as the code to read/write from/to client is

[Spice-devel] [PATCH v4 08/17] Remove DummyChannel* objects

2016-12-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/Makefile.am| 4 +- server/dummy-channel-client.c | 138 +--- server/dummy-channel-client.h | 64 + server/dummy-channel.c| 94 +

[Spice-devel] [PATCH v4 03/17] sound: Rename {Record, Playback}Channel to *ChannelClient

2016-12-01 Thread Frediano Ziglio
Make easier to understand that they refer to client and not all channel. Specifically: - RecordChannel -> RecordChannelClient - PlaybackChannel -> PlaybackChannelClient - playback_channel -> playback_client - record_channel -> record_client Signed-off-by: Frediano Ziglio ---

[Spice-devel] [PATCH v4 12/17] sound: Reuse code for snd_set_{playback, record}_peer

2016-12-01 Thread Frediano Ziglio
Almost identical beside the type. Signed-off-by: Frediano Ziglio --- server/sound.c | 53 +++ 1 file changed, 16 insertions(+), 37 deletions(-) diff --git a/server/sound.c b/server/sound.c index 486fc95..0304fec 100644 ---

[Spice-devel] [PATCH v4 14/17] sound: Reuse code to set volume and mute

2016-12-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/sound.c | 51 +-- 1 file changed, 21 insertions(+), 30 deletions(-) diff --git a/server/sound.c b/server/sound.c index 30a0c20..4c4b533 100644 --- a/server/sound.c +++ b/server/sound.c

[Spice-devel] [PATCH v4 02/17] sound: Rename SndChannel to SndChannelClient

2016-12-01 Thread Frediano Ziglio
SndWorker has been historically based on RedChannel, initial git commit has: struct SndWorker { Channel base; ... }; SndChannel, contrary to what its name may imply is more focused on marshalling/sending of sound data, which is the responsibility of RedChannelClient for the other SPICE

[Spice-devel] [PATCH v4 01/17] sound: Use worker directly

2016-12-01 Thread Frediano Ziglio
SpicePlaybackState and SpiceRecordState have same structures changing only slightly the behaviour. Using SndWorker instead allows some minor simplification and more code reuse. Signed-off-by: Frediano Ziglio --- server/sound.c | 26 -- 1 file changed,

[Spice-devel] [PATCH v4 03/17] sound: Rename {Record, Playback}Channel to *ChannelClient

2016-12-01 Thread Frediano Ziglio
Make easier to understand that they refer to client and not all channel. Specifically: - RecordChannel -> RecordChannelClient - PlaybackChannel -> PlaybackChannelClient - playback_channel -> playback_client - record_channel -> record_client Signed-off-by: Frediano Ziglio ---

[Spice-devel] [PATCH v4 15/17] sound: Use default message handler if possible

2016-12-01 Thread Frediano Ziglio
red_channel_client_handle_message can handle base messages so reuse it. Signed-off-by: Frediano Ziglio --- server/sound.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/server/sound.c b/server/sound.c index 4c4b533..1832e3b 100644 ---

[Spice-devel] [PATCH v4 01/17] sound: Use worker directly

2016-12-01 Thread Frediano Ziglio
SpicePlaybackState and SpiceRecordState have same structures changing only slightly the behaviour. Using SndWorker instead allows some minor simplification and more code reuse. Signed-off-by: Frediano Ziglio --- server/sound.c | 26 -- 1 file changed,

[Spice-devel] [PATCH v4 05/17] sound: Convert SndChannel to GObject

2016-12-01 Thread Frediano Ziglio
Stops using the dummy channel. Data handling still goes through DummyChannelClient which is why empty implementation of some required vfuncs is working. Signed-off-by: Frediano Ziglio --- server/sound.c | 224 +++--- 1 file

[Spice-devel] [PATCH v4 09/17] Make RedChannelClient::incoming private

2016-12-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/red-channel-client-private.h | 11 +++ server/red-channel-client.c | 12 ++-- server/red-channel-client.h | 13 - 3 files changed, 17 insertions(+), 19 deletions(-) diff --git

[Spice-devel] [PATCH v4 06/17] sound: Implements config_socket RedChannel callback

2016-12-01 Thread Frediano Ziglio
This code is the same inside __new_channel but will set the RedsStream from RedChannel. Signed-off-by: Frediano Ziglio --- server/sound.c | 46 +- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/server/sound.c

[Spice-devel] [PATCH v4 00/17] Remove DummyChannel* objects

2016-12-01 Thread Frediano Ziglio
These objects were used by the sound channel as this channel read/write to/from client directly. This make the code of this channel quite different from the other ones. Also this reduce code duplication from RedChannelClient and increase encapsulation. First set of patches attempt to rename

[Spice-devel] [PATCH v4 11/17] sound: Use default disconnect for client channels

2016-12-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/sound.c | 21 - 1 file changed, 21 deletions(-) diff --git a/server/sound.c b/server/sound.c index ebbe821..486fc95 100644 --- a/server/sound.c +++ b/server/sound.c @@ -804,25 +804,6 @@

[Spice-devel] [PATCH v4 13/17] sound: Reuse code for migrating client channels

2016-12-01 Thread Frediano Ziglio
We support only a single client so don't waste code just to check this. The worst stuff can happen is that we'll migrate multiple connections. Signed-off-by: Frediano Ziglio --- server/sound.c | 37 + 1 file changed, 5 insertions(+), 32

Re: [Spice-devel] udscs: Fix a potential NULL pointer dereference

2016-12-01 Thread Christophe Fergeau
On Thu, Dec 01, 2016 at 05:19:33AM +0100, Francois Gouget wrote: > udscs_server_fill_fds() should accept being passed a NULL pointer. I would reword the commit log a bit, like "udscs_server_fill_fds() is dereferencing the 'server' pointer, and then checks if it's NULL. This commit makes sure the

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

2016-12-01 Thread Christophe Fergeau
On Wed, Nov 30, 2016 at 06:40:26PM +0100, Pavel Grunt wrote: > On Fri, 2016-11-25 at 14:52 +, Frediano Ziglio wrote: > > Signed-off-by: Frediano Ziglio > > --- > >  server/reds.c | 7 +++ > >  1 file changed, 7 insertions(+) > > > > diff --git a/server/reds.c

Re: [Spice-devel] [Question] How to evaluate the spice performance?

2016-12-01 Thread Frediano Ziglio
> > Hi guys > > Are there some tools to evaluate the spice client performance. > > There are so many stuff to take into account that there aren't any official tool available. It depends on what you want to measure really. CPU ? Memory ? Network bandwidth ? Frediano

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

2016-12-01 Thread Frediano Ziglio
> > Could be called in replay ? Or is it called indirectly ? > > Pavel > Yes and not. While I was writing this series spice-server-replay was using it. However now this is done automatically by "Free QXL instances in spice_server_destroy" so replay utility has no reason to free the interface.

[Spice-devel] [PATCH v3 4/7] replay: Free spice server to detect leaks

2016-12-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio Acked-by: Pavel Grunt --- 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 +++

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

2016-12-01 Thread Frediano Ziglio
Taking into account that in a following patch the object is destroyed automatically with spice_server_destroy this patch get less important. Currently QXL interfaces are added when physical card are added and QXL cards don't support (in Qemu) hot swap so there is no reason to have this feature.

[Spice-devel] [PATCH v3 5/7] Free replay queues

2016-12-01 Thread Frediano Ziglio
There could be still some data pending. Signed-off-by: Frediano Ziglio Acked-by: Pavel Grunt --- server/tests/replay.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/server/tests/replay.c b/server/tests/replay.c

[Spice-devel] [PATCH v3 6/7] Free properly primary surface during replay

2016-12-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio Acked-by: Pavel Grunt --- 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 +++

[Spice-devel] [PATCH v3 7/7] Support QXL remove on spice_server_remove_interface

2016-12-01 Thread Frediano Ziglio
Allow to dynamically remove QXL interfaces. This could be used to support hot swapping of QXL cards. This code is actually not used in any way. QXL interfaces are destroyed by spice_server_destroy automatically. Signed-off-by: Frediano Ziglio --- server/reds.c | 7 +++ 1

[Spice-devel] [PATCH v3 2/7] Rearrange object destruction

2016-12-01 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| 24 ++-- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git

[Spice-devel] [PATCH v3 3/7] Free QXL instances in spice_server_destroy

2016-12-01 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 17e5ada..d350331 100644 --- a/server/reds.c +++ b/server/reds.c @@ -3592,6 +3592,8 @@ SPICE_GNUC_VISIBLE void

[Spice-devel] [PATCH v3 0/7] Start cleaning objects on destruction

2016-12-01 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

Re: [Spice-devel] [PATCH v4 08/14] sound: Implement on_disconnect RedChannel callback

2016-12-01 Thread Christophe Fergeau
On Wed, Nov 30, 2016 at 12:34:52PM +, Frediano Ziglio wrote: > Avoid having dandling pointer to a client. 'dangling' > > Signed-off-by: Frediano Ziglio > --- > server/sound.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/server/sound.c

Re: [Spice-devel] [PATCH v4 08/14] sound: Implement on_disconnect RedChannel callback

2016-12-01 Thread Frediano Ziglio
> > On Wed, Nov 30, 2016 at 12:34:52PM +, Frediano Ziglio wrote: > > Avoid having dandling pointer to a client. > > 'dangling' > I though I merged this patch in "sound: Convert SndChannelClient to GObject". I did some mistake probably, but will be merged to that patch anyway. > > > >