Re: [Spice-devel] [PATCH v5 7/8] vdagent: Use GMainLoop

2017-10-18 Thread Frediano Ziglio
> > On Tue, Oct 17, 2017 at 10:09 AM, Frediano Ziglio wrote: > > From: Jakub Janků > > > > Replace existing main while-loop with GMainLoop. > > > > Use GIOChannel with g_io_add_watch() to manage IO > > from x11 connections in the main loop. > > > > udscs_connect() now internally creates GSources

Re: [Spice-devel] [spice-server 5/5] channel-client: Implement red_channel_client_get_pipe_item_name

2017-10-18 Thread Christophe Fergeau
On Tue, Oct 17, 2017 at 03:34:14PM -0500, Jonathon Jongsma wrote: > To be honest, to me it feels like the benefit from this change is not > worth the added complexity of generating GEnums and modifying the > channel clients, etc. Do you have plans to use this somewhere? Or do > you just call it fro

Re: [Spice-devel] [PATCH v5 7/8] vdagent: Use GMainLoop

2017-10-18 Thread Jakub Janků
On Wed, Oct 18, 2017, 9:17 AM Frediano Ziglio wrote: > > > > On Tue, Oct 17, 2017 at 10:09 AM, Frediano Ziglio > wrote: > > > From: Jakub Janků > > > > > > Replace existing main while-loop with GMainLoop. > > > > > > Use GIOChannel with g_io_add_watch() to manage IO > > > from x11 connections i

Re: [Spice-devel] [spice-server 1/5] utils: Introduce helpers to map channel types to names

2017-10-18 Thread Christophe Fergeau
On Tue, Oct 17, 2017 at 05:15:22PM -0400, Frediano Ziglio wrote: > > +static const char *const channel_names[] = { > > +[ SPICE_CHANNEL_MAIN ] = "main", > > +[ SPICE_CHANNEL_DISPLAY ] = "display", > > +[ SPICE_CHANNEL_INPUTS ] = "inputs", > > +[ SPICE_CHANNEL_CURSOR ] = "cu

Re: [Spice-devel] [spice-server 1/5] utils: Introduce helpers to map channel types to names

2017-10-18 Thread Frediano Ziglio
> > On Tue, Oct 17, 2017 at 05:15:22PM -0400, Frediano Ziglio wrote: > > > +static const char *const channel_names[] = { > > > +[ SPICE_CHANNEL_MAIN ] = "main", > > > +[ SPICE_CHANNEL_DISPLAY ] = "display", > > > +[ SPICE_CHANNEL_INPUTS ] = "inputs", > > > +[ SPICE_CHANNEL_C

Re: [Spice-devel] [PATCH v5 7/8] vdagent: Use GMainLoop

2017-10-18 Thread Frediano Ziglio
> On Wed, Oct 18, 2017, 9:17 AM Frediano Ziglio < fzig...@redhat.com > wrote: > > > > > > > On Tue, Oct 17, 2017 at 10:09 AM, Frediano Ziglio < fzig...@redhat.com > > > > wrote: > > > > > From: Jakub Janků < janku.jakub...@gmail.com > > > > > > > > > > > Replace existing main while-loop with G

Re: [Spice-devel] [spice-server 5/5] channel-client: Implement red_channel_client_get_pipe_item_name

2017-10-18 Thread Frediano Ziglio
> > On Tue, Oct 17, 2017 at 03:34:14PM -0500, Jonathon Jongsma wrote: > > To be honest, to me it feels like the benefit from this change is not > > worth the added complexity of generating GEnums and modifying the > > channel clients, etc. Do you have plans to use this somewhere? Or do > > you jus

Re: [Spice-devel] [spice-server 5/5] channel-client: Implement red_channel_client_get_pipe_item_name

2017-10-18 Thread Christophe Fergeau
On Wed, Oct 18, 2017 at 04:31:17AM -0400, Frediano Ziglio wrote: > Why don't we have a schema like Unix ioctl (where constants are mostly > uniques) and implement some gdb macros? > For instance we could pretty print the entire channel queue. In my case, it really is something I wanted to pass to

Re: [Spice-devel] [spice-server 1/5] utils: Introduce helpers to map channel types to names

2017-10-18 Thread Christophe Fergeau
On Wed, Oct 18, 2017 at 04:08:50AM -0400, Frediano Ziglio wrote: > > > > On Tue, Oct 17, 2017 at 05:15:22PM -0400, Frediano Ziglio wrote: > > > > +static const char *const channel_names[] = { > > > > +[ SPICE_CHANNEL_MAIN ] = "main", > > > > +[ SPICE_CHANNEL_DISPLAY ] = "display", > >

Re: [Spice-devel] [NSIS] automation: add standard ci support

2017-10-18 Thread Christophe Fergeau
On Wed, Oct 18, 2017 at 09:51:56AM +0300, Yedidyah Bar David wrote: > > Filed for this, so that we do not forget it: > > https://bugzilla.redhat.com/show_bug.cgi?id=1503441 Thanks! > > It's still not a replacement for oVirt's needs - so please > consider/review/ack also current patch. Thanks.

Re: [Spice-devel] [spice-server 1/5] utils: Introduce helpers to map channel types to names

2017-10-18 Thread Frediano Ziglio
> > On Wed, Oct 18, 2017 at 04:08:50AM -0400, Frediano Ziglio wrote: > > > > > > On Tue, Oct 17, 2017 at 05:15:22PM -0400, Frediano Ziglio wrote: > > > > > +static const char *const channel_names[] = { > > > > > +[ SPICE_CHANNEL_MAIN ] = "main", > > > > > +[ SPICE_CHANNEL_DISPLAY ] =

Re: [Spice-devel] [spice-server 1/5] utils: Introduce helpers to map channel types to names

2017-10-18 Thread Christophe Fergeau
On Wed, Oct 18, 2017 at 06:00:00AM -0400, Frediano Ziglio wrote: > > > > On Wed, Oct 18, 2017 at 04:08:50AM -0400, Frediano Ziglio wrote: > > > > > > > > On Tue, Oct 17, 2017 at 05:15:22PM -0400, Frediano Ziglio wrote: > > > > > > +static const char *const channel_names[] = { > > > > > > +[ S

[Spice-devel] [spice-server v2 2/2] channel: Introduce logging helpers

2017-10-18 Thread Christophe Fergeau
This commit adds red_channel_{debug,warning,printerr}() helpers which will prepend the log message with "channel-name:id (%p)". It also changes various locations which were doing this manually. --- server/red-channel-client.c | 34 ++ server/red-channel.c| 1

[Spice-devel] [spice-server v2 1/2] utils: Introduce helpers to map channel types to names

2017-10-18 Thread Christophe Fergeau
spice_server_set_channel_security() is already mostly doing that. We can make its code more generic, and introduce a red_channel_get_name() method. This method will then be used to make debug messages more readable by showing the actual channel name rather than its type as an int. --- Changes since

Re: [Spice-devel] [spice-server 1/5] utils: Introduce helpers to map channel types to names

2017-10-18 Thread Frediano Ziglio
> > On Wed, Oct 18, 2017 at 06:00:00AM -0400, Frediano Ziglio wrote: > > > > > > On Wed, Oct 18, 2017 at 04:08:50AM -0400, Frediano Ziglio wrote: > > > > > > > > > > On Tue, Oct 17, 2017 at 05:15:22PM -0400, Frediano Ziglio wrote: > > > > > > > +static const char *const channel_names[] = { > > >

Re: [Spice-devel] [spice-server v2 2/2] channel: Introduce logging helpers

2017-10-18 Thread Frediano Ziglio
> > This commit adds red_channel_{debug,warning,printerr}() helpers which > will prepend the log message with "channel-name:id (%p)". It also > changes various locations which were doing this manually. > --- > server/red-channel-client.c | 34 ++ > server/red-chann

Re: [Spice-devel] [PATCH spice-server 2/2] reds-stream: Remove useless debug

2017-10-18 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Wed, 2017-10-18 at 07:30 +0100, Frediano Ziglio wrote: > There are already other debugging code showing channel closure. > Not closed file descriptors can easily be detected with other > tools (like netstat or /proc file system). > > Signed-off-by: Frediano Ziglio

Re: [Spice-devel] [PATCH spice-server 1/2] reds-stream: Removed unused "username" field

2017-10-18 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Wed, 2017-10-18 at 07:30 +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > server/reds-stream.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/server/reds-stream.c b/server/reds-stream.c > index 817564e21..c12893793 100644 > --- a/se

[Spice-devel] [PATCH spice-server 2/2] RedStream: make some functions static

2017-10-18 Thread Jonathon Jongsma
These were not used outside of red-stream.c, so make them static and remove them from the header. --- server/red-stream.c | 6 +++--- server/red-stream.h | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/server/red-stream.c b/server/red-stream.c index 6fdf1779f..6ce1642b4 100

[Spice-devel] [PATCH spice-server 1/2] Use standard "Red" namespace

2017-10-18 Thread Jonathon Jongsma
The objects RedsStream and RedsSASL are currently using the namespace "Reds" rather than the standard "Red" namespace used throughout the rest of the project. Change these to be consistent. This also means changing method names and some related enumeration types. The files were also renamed to ref

[Spice-devel] [PATCH] drm/qxl: workaround broken qxl hw primary setting.

2017-10-18 Thread Dave Airlie
From: Dave Airlie QXL hw can't change primary surfaces easily, the server sends a msg and the client flickers a lo when it does. The old pre-atomic page flip code endeavoured to workaround this with a copy operation. This worked by another accident of how the qxl virtual gpu is designed, it does

Re: [Spice-devel] [PATCH spice-server 1/2] Use standard "Red" namespace

2017-10-18 Thread Frediano Ziglio
> > The objects RedsStream and RedsSASL are currently using the namespace > "Reds" rather than the standard "Red" namespace used throughout the rest > of the project. Change these to be consistent. This also means changing > method names and some related enumeration types. > > The files were also