Re: [Spice-devel] [PATCH spice-common] Fix cast to spice_marshalller_intem_free_func function

2018-05-17 Thread Eduardo Lima (Etrunko)
On 17/05/18 18:15, Jonathon Jongsma wrote: > Fine with me. > Thanks, I fixed a typo in header before pushing. s/spice_marshalller_intem_free_func/spice_marshaller_item_free_func > Acked-by: Jonathon Jongsma > > > On Thu, 2018-05-17 at 12:56 -0300, Eduardo Lima (Etrunko) wrote: >> Building w

Re: [Spice-devel] [PATCH spice-common] Fix cast to spice_marshalller_intem_free_func function

2018-05-17 Thread Jonathon Jongsma
Fine with me. Acked-by: Jonathon Jongsma On Thu, 2018-05-17 at 12:56 -0300, Eduardo Lima (Etrunko) wrote: > Building with gcc 8.0.1 from Fedora 28 gives the following error: > > FAILED: common/common@@spice-common@sta/marshaller.c.o > ../common/marshaller.c: In function 'spice_marshaller_reser

Re: [Spice-devel] [PATCH spice-streaming-agent 3/9] Implement an exception hierarchy for ReadError

2018-05-17 Thread Jonathon Jongsma
On Wed, 2018-05-16 at 11:52 +0200, Christophe de Dinechin wrote: > > > > > > save_errno as proposed or err_no ? > > :-) [Note to Jonathon: wouldn't this be read as "err… no!" ???] > No, not really ;) I don't really feel strongly about any of the options here. Jonathon _

[Spice-devel] [PATCH spice-common v2] Fix demarshaller code generator

2018-05-17 Thread Eduardo Lima (Etrunko)
Even though commit df4ec5c3186e796624e4bbf2dc4a269faf2823f6 commented out most of smartcard code which triggered this error, it still might happen if a new message is added with an array member. The reason is a missing declaration of mem_size, which is fixed simply by checking if the attribute 'no

Re: [Spice-devel] [PATCH spice-common 1/2] Fix demarshaller code generator

2018-05-17 Thread Eduardo Lima (Etrunko)
On 17/05/18 14:08, Frediano Ziglio wrote: >> >> Even though commit df4ec5c3186e796624e4bbf2dc4a269faf2823f6 commented >> out most of smartcard code which triggered this error, it still might >> happen if a new message is added with an array member. >> >> The reason is a missing declaration of mem_s

Re: [Spice-devel] [PATCH spice-common 1/2] Fix demarshaller code generator

2018-05-17 Thread Frediano Ziglio
> > Even though commit df4ec5c3186e796624e4bbf2dc4a269faf2823f6 commented > out most of smartcard code which triggered this error, it still might > happen if a new message is added with an array member. > > The reason is a missing declaration of mem_size, which is fixed simply > by checking if th

Re: [Spice-devel] [PATCH spice-common 2/2] Fix field names for Smartcard protocol structures

2018-05-17 Thread Frediano Ziglio
> > Rename struct VSCMsgReaderAdd field 'reader_name' to 'name', and struct > VSCMsgATR field 'data' to 'atr' to match their definitions in file > vscard_common.h. > > The error log follows: > > generated_server_demarshallers.c:1985:30: note: each undeclared identifier is > reported only once fo

Re: [Spice-devel] [PATCH spice-streaming-agent v2] Add name to an unnamed structure

2018-05-17 Thread Lukáš Hrázký
On Thu, 2018-05-17 at 17:21 +0100, Frediano Ziglio wrote: > Unnamed structure combined with inheritance is considered a > bit hard to read, add a name to make more readable. > > Signed-off-by: Frediano Ziglio > --- > src/spice-streaming-agent.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 delet

[Spice-devel] [PATCH spice-streaming-agent v2] Add name to an unnamed structure

2018-05-17 Thread Frediano Ziglio
Unnamed structure combined with inheritance is considered a bit hard to read, add a name to make more readable. Signed-off-by: Frediano Ziglio --- src/spice-streaming-agent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changes since v1: - changed the name diff --git a/src/spice-str

[Spice-devel] [PATCH spice-common] Fix cast to spice_marshalller_intem_free_func function

2018-05-17 Thread Eduardo Lima (Etrunko)
Building with gcc 8.0.1 from Fedora 28 gives the following error: FAILED: common/common@@spice-common@sta/marshaller.c.o ../common/marshaller.c: In function 'spice_marshaller_reserve_space': ../common/marshaller.c:311:27: error: cast between incompatible function types from 'void (*)(void *)' to

Re: [Spice-devel] [PATCH spice-common] Add .gitlab-ci.yml file

2018-05-17 Thread Eduardo Lima (Etrunko)
On 17/05/18 12:11, Frediano Ziglio wrote: >> >> Here is an example of a successful run: >> >> https://gitlab.freedesktop.org/etrunko/spice-common/-/jobs/549 >> > > Stupid question. Is it worth doing giving that spice-common is compiled > and tested from both spice-server and spice-gtk? > Not a s

Re: [Spice-devel] [PATCH spice-common] Add .gitlab-ci.yml file

2018-05-17 Thread Frediano Ziglio
> > Here is an example of a successful run: > > https://gitlab.freedesktop.org/etrunko/spice-common/-/jobs/549 > Stupid question. Is it worth doing giving that spice-common is compiled and tested from both spice-server and spice-gtk? > On 17/05/18 11:29, Eduardo Lima (Etrunko) wrote: > > Signe

[Spice-devel] [PATCH spice-common 2/2] Fix field names for Smartcard protocol structures

2018-05-17 Thread Eduardo Lima (Etrunko)
Rename struct VSCMsgReaderAdd field 'reader_name' to 'name', and struct VSCMsgATR field 'data' to 'atr' to match their definitions in file vscard_common.h. The error log follows: generated_server_demarshallers.c:1985:30: note: each undeclared identifier is reported only once for each function it

[Spice-devel] [PATCH spice-common 1/2] Fix demarshaller code generator

2018-05-17 Thread Eduardo Lima (Etrunko)
Even though commit df4ec5c3186e796624e4bbf2dc4a269faf2823f6 commented out most of smartcard code which triggered this error, it still might happen if a new message is added with an array member. The reason is a missing declaration of mem_size, which is fixed simply by checking if the attribute 'no

Re: [Spice-devel] [PATCH spice-common] Add .gitlab-ci.yml file

2018-05-17 Thread Eduardo Lima (Etrunko)
Here is an example of a successful run: https://gitlab.freedesktop.org/etrunko/spice-common/-/jobs/549 On 17/05/18 11:29, Eduardo Lima (Etrunko) wrote: > Signed-off-by: Eduardo Lima (Etrunko) > --- > .gitlab-ci.yml | 18 ++ > 1 file changed, 18 insertions(+) > create mode 10064

[Spice-devel] [PATCH spice-common] Add .gitlab-ci.yml file

2018-05-17 Thread Eduardo Lima (Etrunko)
Signed-off-by: Eduardo Lima (Etrunko) --- .gitlab-ci.yml | 18 ++ 1 file changed, 18 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000..1d61805 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,18 @@ +imag

Re: [Spice-devel] [PATCH spice-streaming-agent v2 6/9] Add a unit test for the stream port

2018-05-17 Thread Lukáš Hrázký
On Thu, 2018-05-17 at 09:26 -0400, Frediano Ziglio wrote: > > > > On Thu, 2018-05-17 at 05:24 -0400, Frediano Ziglio wrote: > > > > > > > > On Wed, 2018-05-16 at 12:47 -0400, Frediano Ziglio wrote: > > > > > > > > > > > > Signed-off-by: Lukáš Hrázký > > > > > > --- > > > > > > src/unittests/.g

Re: [Spice-devel] [PATCH spice-common] test-overflow: Remove a leak in the test

2018-05-17 Thread Eduardo Lima (Etrunko)
On 17/05/18 11:09, Frediano Ziglio wrote: > This causes errors if Valgrind or sanitizer or similar memory > leak checkers are used. > > Signed-off-by: Frediano Ziglio > --- > tests/test-overflow.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tests/test-overflow.c b/tests/test-overfl

[Spice-devel] [PATCH spice-common] test-overflow: Remove a leak in the test

2018-05-17 Thread Frediano Ziglio
This causes errors if Valgrind or sanitizer or similar memory leak checkers are used. Signed-off-by: Frediano Ziglio --- tests/test-overflow.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test-overflow.c b/tests/test-overflow.c index 0a5bdd2..c972a25 100644 --- a/tests/test-overflow

Re: [Spice-devel] [PATCH spice-common v4] build: Remove FIXME_SERVER_SMARTCARD hack

2018-05-17 Thread Frediano Ziglio
> > This hack is now made obsolete by the previous commit. We can safely > remove those defines and the code now builds fine for both spice server > and spice-gtk. > > commit df4ec5c3186e796624e4bbf2dc4a269faf2823f6 > Author: Frediano Ziglio > Date: Fri May 11 16:59:46 2018 +0100 > > Fix

[Spice-devel] [PATCH spice-common v4] build: Remove FIXME_SERVER_SMARTCARD hack

2018-05-17 Thread Eduardo Lima (Etrunko)
This hack is now made obsolete by the previous commit. We can safely remove those defines and the code now builds fine for both spice server and spice-gtk. commit df4ec5c3186e796624e4bbf2dc4a269faf2823f6 Author: Frediano Ziglio Date: Fri May 11 16:59:46 2018 +0100 Fix generation of Smartca

Re: [Spice-devel] [PATCH spice-streaming-agent v2 6/9] Add a unit test for the stream port

2018-05-17 Thread Frediano Ziglio
> > On Thu, 2018-05-17 at 05:24 -0400, Frediano Ziglio wrote: > > > > > > On Wed, 2018-05-16 at 12:47 -0400, Frediano Ziglio wrote: > > > > > > > > > > Signed-off-by: Lukáš Hrázký > > > > > --- > > > > > src/unittests/.gitignore | 1 + > > > > > src/unittests/Makefile.am |

Re: [Spice-devel] [RFC spice-gtk v3 1/1] Gstreamer: Use GstVideoOverlay if possible

2018-05-17 Thread Frediano Ziglio
> > Hi > > On Thu, May 17, 2018 at 1:50 PM, Frediano Ziglio wrote: > >> > >> On Wed, May 16, 2018 at 3:54 PM, Frediano Ziglio > >> wrote: > >> >> > >> >> On Wed, May 16, 2018 at 10:46:35AM +0200, Christophe Fergeau wrote: > >> >> > On Wed, May 16, 2018 at 10:43:20AM +0200, Christophe Fergeau wr

Re: [Spice-devel] [RFC spice-gtk v3 1/1] Gstreamer: Use GstVideoOverlay if possible

2018-05-17 Thread Marc-André Lureau
Hi On Thu, May 17, 2018 at 1:50 PM, Frediano Ziglio wrote: >> >> On Wed, May 16, 2018 at 3:54 PM, Frediano Ziglio wrote: >> >> >> >> On Wed, May 16, 2018 at 10:46:35AM +0200, Christophe Fergeau wrote: >> >> > On Wed, May 16, 2018 at 10:43:20AM +0200, Christophe Fergeau wrote: >> >> > > On Wed, M

[Spice-devel] [PATCH spice-common v3] codegen: Remove duplicate client and server code from ChannelType::resolve

2018-05-17 Thread Frediano Ziglio
Code that handled client and server messages check was the same, just changed some variable names. Instead use a class to store same information and reuse the code. This allows easier extension of the 2 path of code. Signed-off-by: Frediano Ziglio --- python_modules/ptypes.py | 68 ++

Re: [Spice-devel] [PATCH spice-common v2] codegen: Remove duplicate client and server code from ChannelType::resolve

2018-05-17 Thread Lukáš Hrázký
On Thu, 2018-05-17 at 08:40 -0400, Frediano Ziglio wrote: > > > > On Thu, 2018-05-17 at 07:36 -0400, Frediano Ziglio wrote: > > > > > > > > On Wed, 2018-05-16 at 16:35 +0100, Frediano Ziglio wrote: > > > > > Code that handled client and server messages check was the same, just > > > > > changed s

Re: [Spice-devel] [PATCH spice-common v2] codegen: Remove duplicate client and server code from ChannelType::resolve

2018-05-17 Thread Frediano Ziglio
> > On Thu, 2018-05-17 at 07:36 -0400, Frediano Ziglio wrote: > > > > > > On Wed, 2018-05-16 at 16:35 +0100, Frediano Ziglio wrote: > > > > Code that handled client and server messages check was the same, just > > > > changed some variable names. > > > > Instead use a class to store same informat

Re: [Spice-devel] [PATCH spice-common v2] codegen: Remove duplicate client and server code from ChannelType::resolve

2018-05-17 Thread Lukáš Hrázký
On Thu, 2018-05-17 at 07:36 -0400, Frediano Ziglio wrote: > > > > On Wed, 2018-05-16 at 16:35 +0100, Frediano Ziglio wrote: > > > Code that handled client and server messages check was the same, just > > > changed some variable names. > > > Instead use a class to store same information and reuse t

Re: [Spice-devel] [RFC spice-gtk v3 1/1] Gstreamer: Use GstVideoOverlay if possible

2018-05-17 Thread Frediano Ziglio
> > On Wed, May 16, 2018 at 3:54 PM, Frediano Ziglio wrote: > >> > >> On Wed, May 16, 2018 at 10:46:35AM +0200, Christophe Fergeau wrote: > >> > On Wed, May 16, 2018 at 10:43:20AM +0200, Christophe Fergeau wrote: > >> > > On Wed, May 16, 2018 at 10:23:01AM +0300, Snir Sheriber wrote: > >> > > Yes

Re: [Spice-devel] [PATCH spice-common v2] codegen: Remove duplicate client and server code from ChannelType::resolve

2018-05-17 Thread Frediano Ziglio
> > On Wed, 2018-05-16 at 16:35 +0100, Frediano Ziglio wrote: > > Code that handled client and server messages check was the same, just > > changed some variable names. > > Instead use a class to store same information and reuse the code. > > This allows easier extension of the 2 path of code. > >

Re: [Spice-devel] [PATCH spice-streaming-agent v2 6/9] Add a unit test for the stream port

2018-05-17 Thread Lukáš Hrázký
On Thu, 2018-05-17 at 05:24 -0400, Frediano Ziglio wrote: > > > > On Wed, 2018-05-16 at 12:47 -0400, Frediano Ziglio wrote: > > > > > > > > Signed-off-by: Lukáš Hrázký > > > > --- > > > > src/unittests/.gitignore | 1 + > > > > src/unittests/Makefile.am | 9 - > > > > s

Re: [Spice-devel] [PATCH spice-common v2] codegen: Remove duplicate client and server code from ChannelType::resolve

2018-05-17 Thread Lukáš Hrázký
On Wed, 2018-05-16 at 16:35 +0100, Frediano Ziglio wrote: > Code that handled client and server messages check was the same, just > changed some variable names. > Instead use a class to store same information and reuse the code. > This allows easier extension of the 2 path of code. > > Signed-off-

Re: [Spice-devel] [PATCH spice-common v2] Fix generation of Smartcard channel

2018-05-17 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Wed, May 16, 2018 at 06:00:35PM +0100, Frediano Ziglio wrote: > The Smartcard channel definition has been always broken. > Multiple client messages with the same ID are defined in the channel. > This cause on server demarshaller to only have last message defined,

Re: [Spice-devel] [PATCH spice-streaming-agent v2 6/9] Add a unit test for the stream port

2018-05-17 Thread Frediano Ziglio
> > On Wed, 2018-05-16 at 12:47 -0400, Frediano Ziglio wrote: > > > > > > Signed-off-by: Lukáš Hrázký > > > --- > > > src/unittests/.gitignore | 1 + > > > src/unittests/Makefile.am | 9 - > > > src/unittests/test-stream-port.cpp | 69 > > >

Re: [Spice-devel] [PATCH spice-common] build: Remove FIXME_SERVER_SMARTCARD hack

2018-05-17 Thread Christophe Fergeau
On Thu, May 10, 2018 at 10:34:11AM -0300, Eduardo Lima (Etrunko) wrote: > Ping. > > The meson port depends on this patch. I tried the testing procedure > described in the link below, but could not make it work. Has anyone ever > made it work? I could use some help here. Last time I tried it was w

Re: [Spice-devel] [PATCH spice-streaming-agent v2 6/9] Add a unit test for the stream port

2018-05-17 Thread Lukáš Hrázký
On Wed, 2018-05-16 at 12:47 -0400, Frediano Ziglio wrote: > > > > Signed-off-by: Lukáš Hrázký > > --- > > src/unittests/.gitignore | 1 + > > src/unittests/Makefile.am | 9 - > > src/unittests/test-stream-port.cpp | 69 > > ++ > > 3 f