[Spice-devel] [common v2] codegen: Fix compatibility with Python 2.6

2016-07-29 Thread Francois Gouget
Python 2.6 does not have a flags parameter. This is needed for RHEL 6.8. Signed-off-by: Francois Gouget --- python_modules/marshal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_modules/marshal.py b/python_modules/marshal.py index 0483d3a..402273c 100644 --- a/pyth

Re: [Spice-devel] [spice-gtk v1 10/10] file-transfer: fix leak on _task_get_filename

2016-07-29 Thread Victor Toso
Hi, On Sat, Jul 30, 2016 at 12:26:31AM +0200, Victor Toso wrote: > This fixes the leak of filename. The documentation says that this is > transfer none so Spicy and Virt-Viewer are not trying to free this > string. > > The other option would be changing the documentation to transfer full > and fi

[Spice-devel] [spice-gtk v1 08/10] file-transfer: increase reference for channel-main

2016-07-29 Thread Victor Toso
channel-main uses the SpiceFileTransferTask reference given in the hash table provided by spice_file_transfer_task_create_tasks(). That means SpiceFileTransferTask is not holding a reference for itself but it relies on it due the async calls it provides. This patch increases the reference of each

[Spice-devel] [spice-gtk v1 03/10] test-file-transfer: Don't leak SpiceFileTransferTask

2016-07-29 Thread Victor Toso
The xfer-task reference given by hash table belongs to the caller so we need to release it. Releasing on "finish" callback the same way channel-main does but is possible to do on teardown function too. --- tests/file-transfer.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/file-t

[Spice-devel] [spice-gtk v1 09/10] channel-main: check if file-transfer was completed on idle

2016-07-29 Thread Victor Toso
This patch avoids a race condition. The race happens when the flush callback is in idle when we receive a completed transfer status for the same file-transfer which will be marked as completed and removed from FileTransferOperations hash table. Channel-main should check in its async callbacks if g

[Spice-devel] [spice-gtk v1 01/10] test-file-transfer: Don't leak GFileInfo

2016-07-29 Thread Victor Toso
From: Christophe Fergeau The GFileInfo returned by spice_file_transfer_task_init_task_finish() must be unref'ed when no longer needed. --- tests/file-transfer.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/file-transfer.c b/tests/file-transfer.c index d4d216d..4e00e9a 100644 ---

[Spice-devel] [spice-gtk v1 10/10] file-transfer: fix leak on _task_get_filename

2016-07-29 Thread Victor Toso
This fixes the leak of filename. The documentation says that this is transfer none so Spicy and Virt-Viewer are not trying to free this string. The other option would be changing the documentation to transfer full and fix the applications. This patch breaks API by using const* to return value and

[Spice-devel] [spice-gtk v1 06/10] file-transfer: Fix SpiceFileTransferTask::error leak

2016-07-29 Thread Victor Toso
The self->error is the error set for the file-transfer and it will be propagated with the "finish" signal. As this is transfer none pointer, we should clear it out afterwards. 40 (16 direct, 24 indirect) bytes in 1 blocks are definitely lost in loss record 7,489 of 14,298 at 0x4C2BBAD: malloc (vg

[Spice-devel] [spice-gtk v1 07/10] file-transfer: avoid potential leaks

2016-07-29 Thread Victor Toso
From: Christophe Fergeau --- src/spice-file-transfer-task.c | 4 1 file changed, 4 insertions(+) diff --git a/src/spice-file-transfer-task.c b/src/spice-file-transfer-task.c index 667d230..ca1b51d 100644 --- a/src/spice-file-transfer-task.c +++ b/src/spice-file-transfer-task.c @@ -116,6 +1

[Spice-devel] [spice-gtk v1 04/10] file-transfer: Fix GTask leaks

2016-07-29 Thread Victor Toso
From: Christophe Fergeau The file transfer code calls g_*_async() methods with a GTask as the user_data argument. It needs to own a reference to the GTask for the duration of the async call to keep the GTask alive, however it was never releasing it when it no longer needs it (that is, after calli

[Spice-devel] [spice-gtk v1 02/10] test-file-transfer: Don't leak GError

2016-07-29 Thread Victor Toso
From: Christophe Fergeau --- tests/file-transfer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/file-transfer.c b/tests/file-transfer.c index 4e00e9a..a27b9cf 100644 --- a/tests/file-transfer.c +++ b/tests/file-transfer.c @@ -152,6 +152,7 @@ transfer_cancelled_on_init_async_cb(GO

[Spice-devel] [spice-gtk v1 05/10] file-transfer: Fix SpiceFileTransferTask::file_stream leak

2016-07-29 Thread Victor Toso
From: Christophe Fergeau g_file_read_finish() is (transfer full) so we must release the ref we got in _dispose() as it's not done anywhere else in the code. --- src/spice-file-transfer-task.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/spice-file-transfer-task.c b/src/spice-file-tran

[Spice-devel] [spice-gtk v1 00/10] file-transfer leaks and fixes

2016-07-29 Thread Victor Toso
Hi, Althought the file-transfer seems to work well, I missed some leaks and teuf started to fix them [0], thanks! Based on it I tried a bit to find more related issues to fix. You can find this series in the remote branche at [1] [0] https://cgit.freedesktop.org/~teuf/spice-gtk/log/?h=file-transf

Re: [Spice-devel] [spice-gtk v1] file-transfer: remove unused function for debug

2016-07-29 Thread Victor Toso
Hi, On Fri, Jul 29, 2016 at 03:56:11PM +0200, Pavel Grunt wrote: > Ack Thanks, pushed as 3a91bcfffabfda7667fc560fdc0ac0f2951d0152 > On Fri, 2016-07-29 at 14:47 +0200, Victor Toso wrote: > > This is here due bad rebase. It was removed and replaced by patch > > f6072e678ea5 but not removed from 1a

Re: [Spice-devel] [common] codegen: Fix compatibility with Python 2.6

2016-07-29 Thread Frediano Ziglio
> > This is needed for RHEL 6.8. > > Signed-off-by: Francois Gouget > --- > > This is not the only patch needed to get the latest Spice server to > compile on RHEL 6.8. But this dependency on Python 2.7 seems pretty > needless so it may be worth applying. > Yes, I would add in the comment tha

[Spice-devel] [common] codegen: Fix compatibility with Python 2.6

2016-07-29 Thread Francois Gouget
This is needed for RHEL 6.8. Signed-off-by: Francois Gouget --- This is not the only patch needed to get the latest Spice server to compile on RHEL 6.8. But this dependency on Python 2.7 seems pretty needless so it may be worth applying. python_modules/marshal.py | 2 +- 1 file changed, 1 in

Re: [Spice-devel] [spice-gtk v1] file-transfer: remove unused function for debug

2016-07-29 Thread Pavel Grunt
Ack On Fri, 2016-07-29 at 14:47 +0200, Victor Toso wrote: > This is here due bad rebase. It was removed and replaced by patch > f6072e678ea5 but not removed from 1af22e9652ddcbdd426cd "file-xfer: > move to spice-file-transfer-task.c", so the function is there, unused. > --- >  src/spice-file-transf

Re: [Spice-devel] question: how to test the gstreamer:h264 with qemu ?

2016-07-29 Thread David Jaša
On Pá, 2016-07-29 at 10:19 +0200, cferg...@redhat.com wrote: > On Fri, Jul 29, 2016 at 08:10:46AM +, Li, ZhijianX wrote: > > > > > -Original Message- > > > From: cferg...@redhat.com [mailto:cferg...@redhat.com] > > > Sent: Friday, July 29, 2016 3:17 PM > > > To: Li, ZhijianX > > > Cc:

[Spice-devel] [spice-gtk v1] file-transfer: remove unused function for debug

2016-07-29 Thread Victor Toso
This is here due bad rebase. It was removed and replaced by patch f6072e678ea5 but not removed from 1af22e9652ddcbdd426cd "file-xfer: move to spice-file-transfer-task.c", so the function is there, unused. --- src/spice-file-transfer-task-priv.h | 1 - src/spice-file-transfer-task.c | 15

Re: [Spice-devel] [PATCH spice-gtk] session: Fix IPv6 by using g_network_address_parse

2016-07-29 Thread Pavel Grunt
Hi, On Fri, 2016-07-29 at 14:28 +0200, Victor Toso wrote: > Hi, > > Is it worth to include a new unit test to catch this one? It is worth to test ipv6 connection, but I am not sure about unit test since networking is needed. Pavel > > Based on bz comment: > > > > "Unable to connect to the gra

Re: [Spice-devel] [PATCH spice-gtk] session: Fix IPv6 by using g_network_address_parse

2016-07-29 Thread Victor Toso
Hi, Is it worth to include a new unit test to catch this one? Based on bz comment: > "Unable to connect to the graphic server spice://[::1]:5900" > dialog pops up. > Error reseason is "Error resolving '[::1]': Name or service not known Cheers, On Fri, Jul 29, 2016 at 02:19:29PM +0200, Pavel Gr

Re: [Spice-devel] [PATCH spice-gtk] session: Fix IPv6 by using g_network_address_parse

2016-07-29 Thread Marc-André Lureau
- Original Message - > It supports with [] > > Regression since ea37f06eaa11b6307c797895aeb85d87d142625a oops, ack > > Fixes: > https://bugzilla.redhat.com/show_bug.cgi?id=1361478 > --- > src/spice-session.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sr

Re: [Spice-devel] [PATCH spice-gtk] session: Fix IPv6 by using g_network_address_parse

2016-07-29 Thread Pavel Grunt
On Fri, 2016-07-29 at 14:16 +0200, Pavel Grunt wrote: > It supports with [] It supports quoting the address with [] > > Regression since ea37f06eaa11b6307c797895aeb85d87d142625a > > Fixes: > https://bugzilla.redhat.com/show_bug.cgi?id=1361478 > --- >  src/spice-session.c | 2 +- >  1 file changed,

[Spice-devel] [PATCH spice-gtk] session: Fix IPv6 by using g_network_address_parse

2016-07-29 Thread Pavel Grunt
It supports with [] Regression since ea37f06eaa11b6307c797895aeb85d87d142625a Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1361478 --- src/spice-session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spice-session.c b/src/spice-session.c index db283d4..238b5cb 10

Re: [Spice-devel] question: how to test the gstreamer:h264 with qemu ?

2016-07-29 Thread Francois Gouget
On Fri, 29 Jul 2016, Li, ZhijianX wrote: > Hello guys, > > Recently, I found that spice have supported gstremer:h264 encoding, so I want > to have a try. > But I'm not sure how to test this feature(I am a spice newbie) There's not yet any support for specifying the preferred video codec in ei

Re: [Spice-devel] question: how to test the gstreamer:h264 with qemu ?

2016-07-29 Thread cferg...@redhat.com
On Fri, Jul 29, 2016 at 08:10:46AM +, Li, ZhijianX wrote: > > > -Original Message- > > From: cferg...@redhat.com [mailto:cferg...@redhat.com] > > Sent: Friday, July 29, 2016 3:17 PM > > To: Li, ZhijianX > > Cc: gou...@codeweavers.com; Spice-devel@lists.freedesktop.org > > Subject: Re:

Re: [Spice-devel] question: how to test the gstreamer:h264 with qemu ?

2016-07-29 Thread Li, ZhijianX
> -Original Message- > From: cferg...@redhat.com [mailto:cferg...@redhat.com] > Sent: Friday, July 29, 2016 3:17 PM > To: Li, ZhijianX > Cc: gou...@codeweavers.com; Spice-devel@lists.freedesktop.org > Subject: Re: [Spice-devel] question: how to test the gstreamer:h264 with > qemu ? > > H

Re: [Spice-devel] question: how to test the gstreamer:h264 with qemu ?

2016-07-29 Thread cferg...@redhat.com
Hey, On Fri, Jul 29, 2016 at 03:05:21AM +, Li, ZhijianX wrote: > Hello guys, > > Recently, I found that spice have supported gstremer:h264 encoding, so I want > to have a try. > But I'm not sure how to test this feature(I am a spice newbie) > > If I play a h264 encoding video in the guest,