Re: [Spice-devel] [spice-gtk v1 2/2] file-xfer: fix file path leak

2016-05-12 Thread Fabiano Fidêncio
On Thu, May 12, 2016 at 10:57 PM, Victor Toso wrote: > On Thu, May 12, 2016 at 10:52:09PM +0200, Fabiano Fidêncio wrote: >> On Thu, May 12, 2016 at 10:42 PM, Victor Toso wrote: >> > --- >> > src/channel-main.c | 4 +++- >> > 1 file changed, 3 insertions(+), 1 deletion(-) >> > >> > diff --git a/s

Re: [Spice-devel] [spice-gtk v1 2/2] file-xfer: fix file path leak

2016-05-12 Thread Victor Toso
On Thu, May 12, 2016 at 10:52:09PM +0200, Fabiano Fidêncio wrote: > On Thu, May 12, 2016 at 10:42 PM, Victor Toso wrote: > > --- > > src/channel-main.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/src/channel-main.c b/src/channel-main.c > > index fb0630e..2e2f

Re: [Spice-devel] [spice-gtk v1 1/2] file-xfer: fix segfault on agent disconnection

2016-05-12 Thread Victor Toso
Hi, On Thu, May 12, 2016 at 10:51:02PM +0200, Fabiano Fidêncio wrote: > On Thu, May 12, 2016 at 10:42 PM, Victor Toso wrote: > > As one can see by the backtrace, the reason for the segfault is that > > g_task_return_now() is called under coroutine context and in > > spice_file_transfer_task_compl

Re: [Spice-devel] [spice-gtk v1 2/2] file-xfer: fix file path leak

2016-05-12 Thread Fabiano Fidêncio
On Thu, May 12, 2016 at 10:42 PM, Victor Toso wrote: > --- > src/channel-main.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/channel-main.c b/src/channel-main.c > index fb0630e..2e2fe86 100644 > --- a/src/channel-main.c > +++ b/src/channel-main.c > @@ -2956,8 +2

Re: [Spice-devel] [spice-gtk v1 1/2] file-xfer: fix segfault on agent disconnection

2016-05-12 Thread Fabiano Fidêncio
On Thu, May 12, 2016 at 10:42 PM, Victor Toso wrote: > As one can see by the backtrace, the reason for the segfault is that > g_task_return_now() is called under coroutine context and in > spice_file_transfer_task_completed() we access memory that the > coroutine context has no access. > > With GT

[Spice-devel] [PATCH 07/11] Move InputsChannelClient to a separate file

2016-05-12 Thread Jonathon Jongsma
Preparation for converting to GObject --- server/Makefile.am | 2 + server/inputs-channel-client.c | 92 ++ server/inputs-channel-client.h | 44 server/inputs-channel.c| 76 ++ server/

Re: [Spice-devel] [spice-gtk v1 1/2] file-xfer: fix segfault on agent disconnection

2016-05-12 Thread Victor Toso
On Thu, May 12, 2016 at 10:42:37PM +0200, Victor Toso wrote: > As one can see by the backtrace, the reason for the segfault is that > g_task_return_now() is called under coroutine context and in > spice_file_transfer_task_completed() we access memory that the > coroutine context has no access. > >

[Spice-devel] [PATCH 06/11] change main_channel_marshall_mouse_mode call style

2016-05-12 Thread Jonathon Jongsma
From: Frediano Ziglio Make the call more similar to other marshall function calls in the same function. Signed-off-by: Frediano Ziglio --- server/main-channel-client.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/server/main-channel-client.c b/server/main-channe

[Spice-devel] [PATCH 03/11] move main_channel_release_pipe_item and main_channel_send_item to client

2016-05-12 Thread Jonathon Jongsma
From: Frediano Ziglio These functions deals with client, not with entire channel. This avoid some poking some internals of MainChannelClient. Signed-off-by: Frediano Ziglio --- server/main-channel-client.c | 374 +-- server/main-channel-client.h | 51 +-

[Spice-devel] [PATCH 11/11] Limit direct access to DisplayChannelClient

2016-05-12 Thread Jonathon Jongsma
Add a few more methods and accessors so that other files don't need to manipulate the struct members directly. Move the struct definition to a private header which only the dcc-* files will include. --- server/Makefile.am | 1 + server/dcc-encoders.c| 11 +++--- server/dcc-encoders.h

[Spice-devel] [PATCH 09/11] Remove 'peer' from name of channel client methods

2016-05-12 Thread Jonathon Jongsma
There is some inconsistent naming of RedChannelClient methods. Some include the word 'peer' (which normally seems to refer to RedsStream). Remove the 'peer' terminology from those functions that are basically RedChannelClient methods. --- server/red-channel.c | 18 +- 1 file change

[Spice-devel] [PATCH 08/11] Replace RedChannel::clients with GList

2016-05-12 Thread Jonathon Jongsma
Instead of using a Ring, use a GList to store the list of channel clients. This allows us to iterate the clients without poking inside of the client struct to get the channel_link. This is required in order to make the RedChannelClient struct private. --- server/display-channel.c | 64 ---

[Spice-devel] [PATCH 10/11] Replace RedClient::channels with GList

2016-05-12 Thread Jonathon Jongsma
Allows us to not expose the client_link in RedChannelClient. Acked-by: Pavel Grunt --- server/red-channel.c | 51 --- server/red-channel.h | 5 + 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/server/red-channel.c b/server/re

[Spice-devel] [PATCH 01/11] Add red_client_seamless_migration_done_for_channel()

2016-05-12 Thread Jonathon Jongsma
This is a public RedClient API that handles updating itself rather than having the RedChannelClient poke around at the internal structure in rec_channel_client_seamless_migration_done(). --- server/red-channel.c | 34 ++ 1 file changed, 22 insertions(+), 12 deletion

[Spice-devel] [PATCH 02/11] Move MainChannelClient to separate file

2016-05-12 Thread Jonathon Jongsma
Preparation for converting to GObject --- server/Makefile.am | 2 + server/inputs-channel.c | 2 +- server/main-channel-client.c | 549 ++ server/main-channel-client.h | 153 +++ server/main-channel.c| 616 +++--

[Spice-devel] [PATCH 05/11] move all item creation in main-channel-client.c

2016-05-12 Thread Jonathon Jongsma
From: Frediano Ziglio Move all core to create and destroy MainChannel pipe items in a single place. Signed-off-by: Frediano Ziglio --- server/main-channel-client.c | 34 ++ server/main-channel-client.h | 15 +-- server/main-channel.c| 29 +---

[Spice-devel] [PATCH 00/11] Rebased patches from refactory branch (May 12)

2016-05-12 Thread Jonathon Jongsma
Apologies for the long delay between patch series. A few of the patches from the last series were merged, but quite a few of the patches from that series were too large and complex. I spent some time splitting those out, but that increased the number of patches significantly. Frediano also inserted

[Spice-devel] [PATCH 04/11] let compiler manage the copy in a more typesafe way

2016-05-12 Thread Jonathon Jongsma
From: Frediano Ziglio Do not use memcpy but just copy the data Signed-off-by: Frediano Ziglio --- server/red-channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/red-channel.c b/server/red-channel.c index 66aed41..c88828c 100644 --- a/server/red-channel.c +++ b/

[Spice-devel] [spice-gtk v1 1/2] file-xfer: fix segfault on agent disconnection

2016-05-12 Thread Victor Toso
As one can see by the backtrace, the reason for the segfault is that g_task_return_now() is called under coroutine context and in spice_file_transfer_task_completed() we access memory that the coroutine context has no access. With GTask integration its callback must respect the coroutine context o

[Spice-devel] [spice-gtk v1 2/2] file-xfer: fix file path leak

2016-05-12 Thread Victor Toso
--- src/channel-main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/channel-main.c b/src/channel-main.c index fb0630e..2e2fe86 100644 --- a/src/channel-main.c +++ b/src/channel-main.c @@ -2956,8 +2956,10 @@ static void spice_file_transfer_task_completed(SpiceFileTran

Re: [Spice-devel] [PATCH 07/14] Limit direct access to DisplayChannelClient

2016-05-12 Thread Jonathon Jongsma
On Thu, 2016-05-12 at 22:23 +0200, Pavel Grunt wrote: > On Thu, 2016-05-12 at 14:35 -0500, Jonathon Jongsma wrote: > > On Thu, 2016-05-05 at 14:28 +0200, Pavel Grunt wrote: > > > Hi Jonathon, > > > > > > there are some unrelated changes which should go in separate patch. > > > > > > > > > > [sn

Re: [Spice-devel] [PATCH 07/14] Limit direct access to DisplayChannelClient

2016-05-12 Thread Pavel Grunt
On Thu, 2016-05-12 at 14:35 -0500, Jonathon Jongsma wrote: > On Thu, 2016-05-05 at 14:28 +0200, Pavel Grunt wrote: > > Hi Jonathon, > > > > there are some unrelated changes which should go in separate patch. > > > > > > [snip] > > > > diff --git a/server/dcc.h b/server/dcc.h > > > index 509a6c

Re: [Spice-devel] [PATCH 07/14] Limit direct access to DisplayChannelClient

2016-05-12 Thread Jonathon Jongsma
On Thu, 2016-05-05 at 14:28 +0200, Pavel Grunt wrote: > Hi Jonathon, > > there are some unrelated changes which should go in separate patch. > > [snip] > > diff --git a/server/dcc.h b/server/dcc.h > > index 509a6c6..a56c4e2 100644 > > --- a/server/dcc.h > > +++ b/server/dcc.h > > @@ -18,11 +18

Re: [Spice-devel] [server PATCH v4] LZ4 compression is now available at the Spicevmc channel

2016-05-12 Thread Christophe Fergeau
On Thu, May 05, 2016 at 02:43:34PM +0300, Snir Sheriber wrote: > Compressed message type is CompressedData which contains compression > type (1 byte) followed by the uncompressed data size (4 bytes) followed > by the compressed data size (4 bytes) followed by the compressed data > > If SPICE_USBRE

Re: [Spice-devel] [PATCH] spice-html5: spice_auto.html - actually use ?path when given

2016-05-12 Thread Martin Hradil
> Thanks for the patch, sorry for the very late answer :( > I'll push this now. > > Christophe Hey, no worries, thanks! Martin ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [spice-common PATCH v3] Add LZ4 data compression and used it in spicevmc channel

2016-05-12 Thread Frediano Ziglio
> > Compressed message type is CompressedData which contains compression > type (1 byte) followed by the uncompressed data size (4 bytes) followed > by the compressed data size (4 bytes) followed by the compressed data > --- > common/client_marshallers.h | 1 + > common/messages.h | 7

Re: [Spice-devel] [PATCH] spice-html5: spice_auto.html - actually use ?path when given

2016-05-12 Thread Christophe Fergeau
Hey, Thanks for the patch, sorry for the very late answer :( On Fri, May 06, 2016 at 08:25:13AM +, Martin Hradil wrote: > Right now, `spice_auto.html` reads the path from query string .. and > never actually does anything with it. This should make > `spice_auth.html` respect a path parametr w

Re: [Spice-devel] [PATCH] style: put some notes on inclusion order

2016-05-12 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Wed, May 11, 2016 at 05:33:38PM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > docs/spice_style.txt | 31 +++ > 1 file changed, 31 insertions(+) > > diff --git a/docs/spice_style.txt b/docs/spice_style.txt > i

Re: [Spice-devel] [PATCH spice] spice-migration.h: un-deprecate set_seamless_migration()

2016-05-12 Thread Frediano Ziglio
Merged this morning, forgot to reply. Reasoning was already discussed and approved. Frediano > > > Acked-by: Christophe Fergeau > > On Wed, May 11, 2016 at 08:16:42PM +0200, Marc-André Lureau wrote: > > This function was wrongly marked as deprecated in commit b41220b1441b8. > > > > Signed-of

Re: [Spice-devel] [PATCH spice-gtk] doc, gir: Clarify availability of skip spice_get_option_group

2016-05-12 Thread Victor Toso
Hi, On Thu, May 12, 2016 at 11:08:04AM +0200, Pavel Grunt wrote: > Commit c288627110bbec1aba48b0bf91ce7ab4b12f70b3 made the function > available for other languages through gobject introspections. Mention > the change in the function description. Sure, Acked-by: Victor Toso > --- > src/spice-o

[Spice-devel] [PATCH spice-gtk] doc, gir: Clarify availability of skip spice_get_option_group

2016-05-12 Thread Pavel Grunt
Commit c288627110bbec1aba48b0bf91ce7ab4b12f70b3 made the function available for other languages through gobject introspections. Mention the change in the function description. --- src/spice-option.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/spice-option.c b/src/spice-option.c index

Re: [Spice-devel] [PATCH spice] spice-migration.h: un-deprecate set_seamless_migration()

2016-05-12 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Wed, May 11, 2016 at 08:16:42PM +0200, Marc-André Lureau wrote: > This function was wrongly marked as deprecated in commit b41220b1441b8. > > Signed-off-by: Marc-André Lureau > --- > server/spice-migration.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(

Re: [Spice-devel] [PATCH 1/2] unify header include order

2016-05-12 Thread Christophe Fergeau
On Wed, May 11, 2016 at 12:25:00PM -0400, Frediano Ziglio wrote: > > > > On Tue, May 10, 2016 at 02:23:04PM +0100, Frediano Ziglio wrote: > > > Use this style for include headers inside headers: > > > > > > #include > > > #include > > > #include > > > #include > > > > > > #include