Re: [Spice-devel] [PATCH v3 1/8] replay: Record allocations in a GList to handle errors

2016-09-19 Thread Jonathon Jongsma
On Mon, 2016-09-19 at 18:35 +0200, Victor Toso wrote: > Hi, > > On Fri, Sep 16, 2016 at 12:32:54PM +0100, Frediano Ziglio wrote: > > > > Allocations are kept into a GList to be able to free in case some > > errors happened. > > > > Signed-off-by: Frediano Ziglio > > --- > >  server/red-replay-q

Re: [Spice-devel] [PATCH v3 1/8] replay: Record allocations in a GList to handle errors

2016-09-19 Thread Victor Toso
Hi, On Fri, Sep 16, 2016 at 12:32:54PM +0100, Frediano Ziglio wrote: > Allocations are kept into a GList to be able to free in case some > errors happened. > > Signed-off-by: Frediano Ziglio > --- > server/red-replay-qxl.c | 68 > - > 1 file chang

Re: [Spice-devel] [PATCH 2/3] Use and introduce channel client cast macros

2016-09-19 Thread Frediano Ziglio
> > In anticipation of porting to GObject, use casting macros (e.g. > MAIN_CHANNEL_CLIENT()) to cast RedChannelClient types. This will help > reduce the changeset slightly porting to GObject and thus make it easier > to review those upcoming changes. > --- > server/cursor-channel-client.c | 4 ++

Re: [Spice-devel] [RFC PATCH 0/2] Reintroduce some macro to iterate containers

2016-09-19 Thread Uri Lublin
On 09/16/2016 06:06 PM, Frediano Ziglio wrote: With the introduction of GList/GQueue these macro were removed at the expense of some minor regressions. The first patch was started time ago and resemble more to old macro while the second try to use some more safe way. Frediano Ziglio (2): RedCh

[Spice-devel] [PATCH 2/3] Use and introduce channel client cast macros

2016-09-19 Thread Jonathon Jongsma
In anticipation of porting to GObject, use casting macros (e.g. MAIN_CHANNEL_CLIENT()) to cast RedChannelClient types. This will help reduce the changeset slightly porting to GObject and thus make it easier to review those upcoming changes. --- server/cursor-channel-client.c | 4 ++-- server/dcc.

[Spice-devel] [PATCH 0/3] Rebased patches from refactory (Sept 19)

2016-09-19 Thread Jonathon Jongsma
This is the beginning of the series of patches that convert some of the internal objects to use GObject. This first set is small and only includes the RedChannelClient heirarchy. Jonathon Jongsma (3): Generate GTypes for spice-server enums Use and introduce channel client cast macros Convert

[Spice-devel] [PATCH 1/3] Generate GTypes for spice-server enums

2016-09-19 Thread Jonathon Jongsma
The GType will be useful to allow these enums to be used as GObject properties. --- .gitignore | 2 ++ server/Makefile.am | 31 +++ 2 files changed, 33 insertions(+) diff --git a/.gitignore b/.gitignore index 90fb62a..2df7c3f 100644 --- a/.gitignore +++ b/.git

Re: [Spice-devel] [PATCH v2] fixup! Change Drawable->pipes from Ring to GList

2016-09-19 Thread Jonathon Jongsma
On Mon, 2016-09-19 at 08:45 -0400, Frediano Ziglio wrote: > > > > On Fri, 2016-09-16 at 12:57 -0400, Frediano Ziglio wrote: > > > > > > > > > > > > > > > > > > > Fix potential infinite loop > > > > --- > > > >  server/stream.c | 11 --- > > > >  1 file changed, 4 insertions(+), 7 deleti

Re: [Spice-devel] [PATCH v2] fixup! Change Drawable->pipes from Ring to GList

2016-09-19 Thread Frediano Ziglio
> On Fri, 2016-09-16 at 12:57 -0400, Frediano Ziglio wrote: > > > > > > > > > Fix potential infinite loop > > > --- > > >  server/stream.c | 11 --- > > >  1 file changed, 4 insertions(+), 7 deletions(-) > > > > > > diff --git a/server/stream.c b/server/stream.c > > > index 934b236..49b5

Re: [Spice-devel] [PATCH 2/8] Simplify send_free_list

2016-09-19 Thread Frediano Ziglio
> > What's the simplification -- always send two headers and > possibly have the wait_m one empty ? > > The check for free_list->wait.header.wait_count was already done some lines above so I removed as always true. Frediano > > On 09/19/2016 11:29 AM, Frediano Ziglio wrote: > > Signed-off-by

Re: [Spice-devel] [PATCH 2/8] Simplify send_free_list

2016-09-19 Thread Uri Lublin
What's the simplification -- always send two headers and possibly have the wait_m one empty ? On 09/19/2016 11:29 AM, Frediano Ziglio wrote: Signed-off-by: Frediano Ziglio --- server/dcc-send.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/server/dc

Re: [Spice-devel] [RFC PATCH 2/2] Introduce some macro to simplify iteration on GList

2016-09-19 Thread Uri Lublin
On 09/16/2016 06:06 PM, Frediano Ziglio wrote: Noting that coding by hand these loop introduced some regression I'm trying to introduce back from macros. Before trying something harder to make possible to bind the type of the content I'm trying some simple macro as were before. I added the type t

Re: [Spice-devel] [RFC PATCH 1/2] RedChannel: Add FOREACH_CHANNEL and use it to iterate

2016-09-19 Thread Uri Lublin
On 09/16/2016 06:06 PM, Frediano Ziglio wrote: Signed-off-by: Frediano Ziglio --- server/red-channel.c | 50 +++--- 1 file changed, 23 insertions(+), 27 deletions(-) Hi Frediano, Looks good to me. Please make the FOREACH_CLIENT changes in a separa

Re: [Spice-devel] spice-gtk is broken in Fedora 25

2016-09-19 Thread Pavel Grunt
Hi, On Sun, 2016-09-18 at 22:34 +0200, Hans de Goede wrote: > Hi, > > I needed a vm to test something and I noticed that spice-gtk > appears to be broken in F25. As long as scaling between the > guest resolution and the window size is needed everything > works fine, but as soon as the agent adjus

[Spice-devel] [PATCH 5/8] Simplify serial sending packets

2016-09-19 Thread Frediano Ziglio
serial was the future serial to send while last_sent_serial was the last sent. serial sent started from 1. To make sure sequence variable is updated just before sending the message, not every message prepared. Signed-off-by: Frediano Ziglio --- server/red-channel-client-private.h | 1 - server/

[Spice-devel] [PATCH 0/8] Miscellaneous patches

2016-09-19 Thread Frediano Ziglio
Frediano Ziglio (8): Revert if to make code more readable Simplify send_free_list Use spice_realloc instead of manually code it Remove only set serial field Simplify serial sending packets worker: Do not check surface twice Remove unused fields Small comment on structure checking

[Spice-devel] [PATCH 7/8] Remove unused fields

2016-09-19 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/display-channel.h | 2 -- server/red-worker.h | 1 - 2 files changed, 3 deletions(-) diff --git a/server/display-channel.h b/server/display-channel.h index 7b71480..cf4135d 100644 --- a/server/display-channel.h +++ b/server/display-channel.h @@ -55,

[Spice-devel] [PATCH 8/8] Small comment on structure checking

2016-09-19 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/display-channel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/server/display-channel.c b/server/display-channel.c index 108e69b..3290565 100644 --- a/server/display-channel.c +++ b/server/display-channel.c @@ -1968,6 +1968,7 @@ void display_channe

[Spice-devel] [PATCH 6/8] worker: Do not check surface twice

2016-09-19 Thread Frediano Ziglio
validate_surface already do the same checks. Signed-off-by: Frediano Ziglio --- server/red-worker.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/server/red-worker.c b/server/red-worker.c index 590412b..e39bd84 100644 --- a/server/red-worker.c +++ b/server/red-worker.c @@ -693,12 +693

[Spice-devel] [PATCH 2/8] Simplify send_free_list

2016-09-19 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/dcc-send.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/server/dcc-send.c b/server/dcc-send.c index 2215f69..ab6edc2 100644 --- a/server/dcc-send.c +++ b/server/dcc-send.c @@ -263,9 +263,9 @@ static void send_fr

[Spice-devel] [PATCH 3/8] Use spice_realloc instead of manually code it

2016-09-19 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/dcc.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/server/dcc.c b/server/dcc.c index a56b658..c9d0231 100644 --- a/server/dcc.c +++ b/server/dcc.c @@ -811,14 +811,9 @@ static void dcc_push_release(DisplayChannelClient *d

[Spice-devel] [PATCH 4/8] Remove only set serial field

2016-09-19 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/red-channel-client.c | 2 -- server/red-channel-client.h | 1 - 2 files changed, 3 deletions(-) diff --git a/server/red-channel-client.c b/server/red-channel-client.c index 0eed02b..4108be0 100644 --- a/server/red-channel-client.c +++ b/server/red-channe

[Spice-devel] [PATCH 1/8] Revert if to make code more readable

2016-09-19 Thread Frediano Ziglio
Keep all code to send SPICE_MSG_LIST together. Signed-off-by: Frediano Ziglio --- server/dcc-send.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/dcc-send.c b/server/dcc-send.c index 1d32276..2215f69 100644 --- a/server/dcc-send.c +++ b/server/dcc-send.c @@ -2

[Spice-devel] [PATCH 3/3] Extended protocol documentation

2016-09-19 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- docs/spice_protocol.txt | 360 1 file changed, 360 insertions(+) diff --git a/docs/spice_protocol.txt b/docs/spice_protocol.txt index 3406cb9..29dedc1 100644 --- a/docs/spice_protocol.txt +++ b/docs/spice_protoco

[Spice-devel] [PATCH 1/3] Start adding protocol file documentation

2016-09-19 Thread Frediano Ziglio
The protocol file is not documented and people have to read code to understand the specification. This can lead to unexpected or not optimal results so it's better to have it documented. The m4/spice_manual.m4 came from spice server and is meant to be reused. Signed-off-by: Frediano Ziglio --- M

[Spice-devel] [PATCH 2/3] Start writing some documentation on protocol

2016-09-19 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- docs/spice_protocol.txt | 48 1 file changed, 48 insertions(+) diff --git a/docs/spice_protocol.txt b/docs/spice_protocol.txt index b62da25..3406cb9 100644 --- a/docs/spice_protocol.txt +++ b/docs/spice_protocol.