Re: [Spice-devel] [PATCH spice-streaming-agent 2/3] Change numbering schema

2018-04-24 Thread Frediano Ziglio
> > There was also some input from Lukas, which I had integrated here: > https://github.com/c3d/spice-streaming-agent/commit/6f04ffd8d03c9b43533cd7082cb755bb79accf90. > Basically, using an enum class. > > And there were some comments from either you or Christophe, I forgot, which I > tried to

Re: [Spice-devel] [PATCH spice-gtk] tests: Shut up warnings about unitialized struct fields

2018-04-24 Thread Frediano Ziglio
> > Build complains about lots of unitialized fields in TestCase definition, > for instance: > > ../tests/session.c:276:11: warning: missing initializer for field ‘message’ > of ‘TestCase {aka const struct }’ [-Wmissing-field-initializers] >"spice://[::192.9.5.5]:5910" }, >

[Spice-devel] [PATCH spice-gtk] tests: Shut up warnings about unitialized struct fields

2018-04-24 Thread Eduardo Lima (Etrunko)
Build complains about lots of unitialized fields in TestCase definition, for instance: ../tests/session.c:276:11: warning: missing initializer for field ‘message’ of ‘TestCase {aka const struct }’ [-Wmissing-field-initializers] "spice://[::192.9.5.5]:5910" },

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-24 Thread Christophe de Dinechin
> On 24 Apr 2018, at 18:21, Christophe Fergeau wrote: > > On Tue, Apr 24, 2018 at 05:01:33PM +0200, Christophe de Dinechin wrote: >> But we still have the capability to reject a plugin (in a well >> defined, non-crashing way) for other reasons. >> [...] >> To summarize,

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-24 Thread Christophe Fergeau
On Tue, Apr 24, 2018 at 05:01:33PM +0200, Christophe de Dinechin wrote: > But we still have the capability to reject a plugin (in a well > defined, non-crashing way) for other reasons. > [...] > To summarize, the purpose of the compatibility check is to guarantee > well-defined behavior on the

Re: [Spice-devel] Gitlab - 2018!

2018-04-24 Thread Victor Toso
Hey, JFYI, we'll be migrating to gitlab.freedesktop.org late this week, see: https://gitlab.freedesktop.org/freedesktop/freedesktop/issues/9 We already have a group there with users with git access to spice project were created already, see: https://gitlab.freedesktop.org/spice When the move

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-24 Thread Christophe de Dinechin
> On 28 Mar 2018, at 17:20, Christophe Fergeau wrote: > > On Wed, Mar 28, 2018 at 11:10:36AM +0200, Christophe de Dinechin wrote: >> >> >>> On 26 Mar 2018, at 19:06, Christophe Fergeau wrote: >>> >>> On Fri, Mar 23, 2018 at 01:05:23PM +0100,

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-24 Thread Christophe de Dinechin
> On 20 Apr 2018, at 12:51, Christophe Fergeau wrote: > > On Fri, Apr 20, 2018 at 10:10:17AM +0200, Christophe de Dinechin wrote: >> There is no easy way to test if a method is there. There is, however, >> an easy way to test if a C entry point is there in a shared

Re: [Spice-devel] [PATCH spice-server] glz-encoder: Do not discard top bits of lower part sending 64 bit ints

2018-04-24 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Mon, 2018-04-23 at 10:51 +0100, Frediano Ziglio wrote: > When GLZ code attempts to send a 64 bit integer the 8 top bit of > the lower (32 bits) part of the number are stripped due to a bug. > > This was discovered by Zhongqiang Huang

Re: [Spice-devel] MR!3 patch

2018-04-24 Thread Jon Stumpf
Frediano, I will this evening when I return home and after I read how to use "git format-patch". - jss On Tue, Apr 24, 2018 at 7:00 AM, Frediano Ziglio wrote: > > Here is the patch for Merge Request 3 (MR!3). The WebIDE must have > changed > > the end-of-line sequence as

Re: [Spice-devel] [PATCH spice-streaming-agent 2/3] Change numbering schema

2018-04-24 Thread Christophe de Dinechin
There was also some input from Lukas, which I had integrated here: https://github.com/c3d/spice-streaming-agent/commit/6f04ffd8d03c9b43533cd7082cb755bb79accf90. Basically, using an enum class. And there were some comments from either you or Christophe, I forgot, which I tried to capture here:

Re: [Spice-devel] MR!3 patch

2018-04-24 Thread Frediano Ziglio
> Here is the patch for Merge Request 3 (MR!3). The WebIDE must have changed > the end-of-line sequence as I produced this with "git diff > --ignore-all-space". > - jss Jon, can you provide patches in the form of git changes? Instead of git diff you can use git format-patch. Alternatively add

[Spice-devel] MR!3 patch

2018-04-24 Thread Jon Stumpf
Here is the patch for Merge Request 3 (MR!3). The WebIDE must have changed the end-of-line sequence as I produced this with "git diff --ignore-all-space". - jss diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp index 5fa9c9a..e73a4f9 100755 --- a/qxldod/QxlDod.cpp +++ b/qxldod/QxlDod.cpp @@

[Spice-devel] MR!1 patch

2018-04-24 Thread Jon Stumpf
Here is the patch for Merge Request 1 (MR!1). The WebIDE must have changed the end-of-line sequence as I produced this with "git diff --ignore-all-space". - jss diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp index 4f508bd..5fa9c9a 100755 --- a/qxldod/QxlDod.cpp +++ b/qxldod/QxlDod.cpp @@

[Spice-devel] [spice-server v3 00/14] qxl: Move more guest resource release to red-parse-qxl

2018-04-24 Thread Christophe Fergeau
Hey, Currently, after parsing a QXL command through red-parse-qxl, the code which got the command has to tell red-parse-qxl when it no longer needs the command, but also to remember to release the command QXL resources itself. This series moves this 'release resource' logic to red-parse-qxl. This

[Spice-devel] [spice-server v3 04/14] qxl: Add red_cursor_cmd_{new, ref, unref} helpers

2018-04-24 Thread Christophe Fergeau
Currently, the cursor channel is allocating RedCursorCmd instances itself, and then calling into red-parse-qxl.h to initialize it, and doing something similar when releasing the data. This commit moves this common code to red-parse-qxl.[ch] The ref/unref are not strictly needed,

[Spice-devel] [spice-server v3 14/14] qxl: Use QXLCommandExt in external red-parse-qxl.h API

2018-04-24 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 146 +++- server/red-parse-qxl.h | 12 ++-- server/red-worker.c | 12 ++-- server/tests/test-qxl-parsing.c | 32 +++-- 4 files changed, 107

[Spice-devel] [spice-server v3 02/14] qxl: Make red_{get, put}_drawable static

2018-04-24 Thread Christophe Fergeau
Rather than needing to call red_drawable_new() and then initialize it with red_get_drawable(), we can improve slightly red_drawable new so that red_drawable_{new,ref,unref} is all which is used by code out of red-parse-qxl.c. Signed-off-by: Christophe Fergeau ---

[Spice-devel] [spice-server v3 08/14] qxl: Add red_update_cmd_{new, ref, unref} helpers

2018-04-24 Thread Christophe Fergeau
Currently, RedUpdateCmd are allocated on the stack, and then initialized/uninitialized with red_{get,put}_update_cmd This makes the API inconsistent with what is being done for RedDrawable, RedCursor and RedMessage. QXLUpdateCmd are not occurring very often, we can dynamically allocate them

[Spice-devel] [spice-server v3 03/14] qxl: Fix guest resources release in red_put_drawable()

2018-04-24 Thread Christophe Fergeau
At the moment, we'll unconditionally release the guest QXL resources in red_put_drawable() even if red_get_drawable() failed and did not initialize drawable->release_info_ext properly. This commit only sets RedDrawable::qxl once the guest resource have been successfully retrieved, and only free

[Spice-devel] [spice-server v3 12/14] qxl: Improve 'red' and 'qxl' argument names

2018-04-24 Thread Christophe Fergeau
All the methods related to QXL command parsing have a 'qxl' argument which designates the guest side resources, and a 'red' argument, which designates the spice-server side data which has been parsed from 'qxl'. When reading random functions in red-parse-qxl.c, it's quite easy to wonder what a

[Spice-devel] [spice-server v3 06/14] qxl: Add red_message_{new, ref, unref} helpers

2018-04-24 Thread Christophe Fergeau
Currently, RedMessage are allocated on the stack, and then initialized/uninitialized with red_{get,put}_message This makes the API inconsistent with what is being done for RedDrawable and RedCursor. Since QXLMessage is just a (mostly unused/unsecure) debugging tool, we can dynamically allocate it

[Spice-devel] [spice-server v3 09/14] qxl: Add red_surface_cmd_{new, ref, unref} helpers

2018-04-24 Thread Christophe Fergeau
Currently, RedWorker is using stack-allocated variables for RedSurfaceCmd. Surface commands are rare enough that we can dynamically allocated them insntead, and make the API in red-parse-qxl.h consistent with how other QXL commands are handled. Signed-off-by: Christophe Fergeau

[Spice-devel] [spice-server v3 07/14] qxl: Release QXL resources in red_put_update_cmd

2018-04-24 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 11 +++ server/red-parse-qxl.h | 3 ++- server/red-worker.c| 3 +-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index

[Spice-devel] [spice-server v3 05/14] qxl: Release QXL resource in red_put_message

2018-04-24 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 7 +-- server/red-parse-qxl.h | 3 ++- server/red-worker.c| 3 +-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index ac612dd5d..24d3b838f

[Spice-devel] [spice-server v3 11/14] qxl: Release QXL resources in red_put_surface_cmd

2018-04-24 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- server/display-channel.c | 3 --- server/red-parse-qxl.c | 12 server/red-parse-qxl.h | 1 + 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/server/display-channel.c b/server/display-channel.c index

[Spice-devel] [spice-server v3 10/14] display-channel: Store full RedSurfaceCmd, not just QXLReleaseInfoExt

2018-04-24 Thread Christophe Fergeau
Now that we have a refcounted RedSurfaceCmd, we can store the command itself in DisplayChannel rather than copying QXLReleaseInfoExt. This will let us move the release of the QXL guest resources in red-parse-qxl in the next commit. Signed-off-by: Christophe Fergeau ---

[Spice-devel] [spice-server v3 13/14] qxl: Introduce RedQXLGuestResources

2018-04-24 Thread Christophe Fergeau
This allows to share a bit of code in red-parse-qxl.c, but does not help with reducing the number of args which are passed to the parsing functions. Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 112 ++---

[Spice-devel] [spice-server v3 01/14] qxl: Move red_drawable_unref/red_drawable_new

2018-04-24 Thread Christophe Fergeau
RedDrawable really is a RedDrawCmd which is parsed by red-parse-qxl.h Moreover, red_drawable_ref() is already defined inline in red-parse-qxl.h, and red_drawable_unref() is declared there too even if its code is still in red-worker.c This commit moves them close to the other functions