Re: [Spice-devel] [nsis v3 2/2] build: Don't add .pdb debug files to the installer

2017-12-20 Thread Yedidyah Bar David
On Wed, Dec 20, 2017 at 4:10 PM, Frediano Ziglio wrote: >> >> On Tue, Dec 19, 2017 at 11:26:00AM -0500, Frediano Ziglio wrote: >> > > >> > > The .pdb files contain the debug information for the drivers. They >> > > increase significantly the size of the installer, so it's better not to >> > > ship

Re: [Spice-devel] [PATCH spice-server v2 03/13] red-stream: Avoid useless copy of mechlist

2017-12-20 Thread Frediano Ziglio
> > On Wed, Dec 20, 2017 at 09:35:00AM +, Frediano Ziglio wrote: > > The list will persist while the SASL connection is not disposed > > (or another sasl_listmech called). > > > > From documentation: > > * results: > > * result-- NUL terminated result which persists until next > > *

Re: [Spice-devel] [PATCH spice-server v2 03/13] red-stream: Avoid useless copy of mechlist

2017-12-20 Thread Christophe Fergeau
On Wed, Dec 20, 2017 at 09:35:00AM +, Frediano Ziglio wrote: > The list will persist while the SASL connection is not disposed > (or another sasl_listmech called). > > From documentation: > * results: > * result-- NUL terminated result which persists until next > * call t

Re: [Spice-devel] [spice-gtk v1 1/3] Improve debug log for preferred compression message

2017-12-20 Thread Christophe Fergeau
On Wed, Dec 20, 2017 at 03:47:25PM +0100, Victor Toso wrote: > To be honest, I wrote this patch 3 times because of this. There > are other places in the source code that we do enum-to-string > conversion and I was thinking in making this better now too. > > But then I thought that I was complicati

Re: [Spice-devel] [spice-gtk v1 1/3] Improve debug log for preferred compression message

2017-12-20 Thread Victor Toso
Hi, On Wed, Dec 20, 2017 at 09:41:30AM -0500, Frediano Ziglio wrote: > > > > On 12/20/2017 03:18 PM, Victor Toso wrote: > > > From: Victor Toso > > > > Hi Victor, > > > > > > > > To use a string instead of number (enum) > > > > > > Signed-off-by: Victor Toso > > > --- > > > src/channel-di

Re: [Spice-devel] [spice-gtk v1 1/3] Improve debug log for preferred compression message

2017-12-20 Thread Frediano Ziglio
> > On 12/20/2017 03:18 PM, Victor Toso wrote: > > From: Victor Toso > > Hi Victor, > > > > > To use a string instead of number (enum) > > > > Signed-off-by: Victor Toso > > --- > > src/channel-display.c | 26 +- > > 1 file changed, 25 insertions(+), 1 deletion(-)

Re: [Spice-devel] [spice-gtk v1 1/3] Improve debug log for preferred compression message

2017-12-20 Thread Uri Lublin
On 12/20/2017 03:18 PM, Victor Toso wrote: From: Victor Toso Hi Victor, To use a string instead of number (enum) Signed-off-by: Victor Toso --- src/channel-display.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/channel-display.c b/s

Re: [Spice-devel] [nsis v3 2/2] build: Don't add .pdb debug files to the installer

2017-12-20 Thread Frediano Ziglio
> > On Tue, Dec 19, 2017 at 11:26:00AM -0500, Frediano Ziglio wrote: > > > > > > The .pdb files contain the debug information for the drivers. They > > > increase significantly the size of the installer, so it's better not to > > > ship them. > > > > On the other side bug report will contain muc

Re: [Spice-devel] [PATCH spice-server v2 1/2] test-stream-device: Better Qemu emulation for data reading

2017-12-20 Thread Frediano Ziglio
ping series > > Qemu does not trigger a new data read if we don't read all data in > the buffer. > > Signed-off-by: Frediano Ziglio > --- > server/stream-device.c| 9 > server/tests/test-stream-device.c | 43 > +-- > 2 files changed, 5

Re: [Spice-devel] [spice-gtk v1 1/3] Improve debug log for preferred compression message

2017-12-20 Thread Frediano Ziglio
> > From: Victor Toso > > To use a string instead of number (enum) > > Signed-off-by: Victor Toso > --- > src/channel-display.c | 26 +- > 1 file changed, 25 insertions(+), 1 deletion(-) > > diff --git a/src/channel-display.c b/src/channel-display.c > index 75d2e32..d

Re: [Spice-devel] [spice-gtk v1 3/3] Fix clang's double-promotion warning

2017-12-20 Thread Frediano Ziglio
> > From: Victor Toso > > Casting to gdouble instead to float to avoid the warning and perhaps > increase the precision. > > spice-widget-egl.c:573:28: error: implicit conversion increases > floating-point precision: 'float' to 'gdouble' (aka 'double') > tx = ((float)d->area.x / (float)d->e

Re: [Spice-devel] [spice-gtk v1 2/3] Improve debug log for preferred video codec message

2017-12-20 Thread Frediano Ziglio
> > From: Victor Toso > > The gst_opts[] array was moved to the -priv.h header > inc96af50e2dd16b02b189e8 - Let's use it to improve debug messages. > > Signed-off-by: Victor Toso > --- > src/channel-display.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/channe

[Spice-devel] [spice-gtk v1 2/3] Improve debug log for preferred video codec message

2017-12-20 Thread Victor Toso
From: Victor Toso The gst_opts[] array was moved to the -priv.h header inc96af50e2dd16b02b189e8 - Let's use it to improve debug messages. Signed-off-by: Victor Toso --- src/channel-display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/channel-display.c b/src/channel

[Spice-devel] [spice-gtk v1 3/3] Fix clang's double-promotion warning

2017-12-20 Thread Victor Toso
From: Victor Toso Casting to gdouble instead to float to avoid the warning and perhaps increase the precision. spice-widget-egl.c:573:28: error: implicit conversion increases floating-point precision: 'float' to 'gdouble' (aka 'double') tx = ((float)d->area.x / (float)d->egl.scanout.width);

[Spice-devel] [spice-gtk v1 1/3] Improve debug log for preferred compression message

2017-12-20 Thread Victor Toso
From: Victor Toso To use a string instead of number (enum) Signed-off-by: Victor Toso --- src/channel-display.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/channel-display.c b/src/channel-display.c index 75d2e32..dece3b9 100644 --- a/src/c

Re: [Spice-devel] [PATCH spice-server] reds: Remove stream watch handling link in a single place

2017-12-20 Thread Uri Lublin
On 12/19/2017 06:58 PM, Frediano Ziglio wrote: Hi Frediano, Note that there still is another call to red_stream_remove_watch, (in reds_handle_ssl_accept), so consider changing the subject. Yes, but this one is not handling link but SSL/TLS. One comment below. On 12/19/2017 03:38 PM, Fred

[Spice-devel] [PATCH spice-server v2 02/13] red-stream: Avoid infinite loop on sasl_encode/decode failure

2017-12-20 Thread Frediano Ziglio
These functions do not set errno so is possible that errno is EAGAIN. This would cause an infinite loop in functions like red_stream_write_all (or potentially using the event loop). Signed-off-by: Frediano Ziglio --- server/red-stream.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/serve

Re: [Spice-devel] [nsis v3 2/2] build: Don't add .pdb debug files to the installer

2017-12-20 Thread Christophe Fergeau
On Tue, Dec 19, 2017 at 11:26:00AM -0500, Frediano Ziglio wrote: > > > > The .pdb files contain the debug information for the drivers. They > > increase significantly the size of the installer, so it's better not to > > ship them. > > On the other side bug report will contain much less informatio

[Spice-devel] [PATCH spice-server v2 12/13] red-stream: Unify start and step passes

2017-12-20 Thread Frediano Ziglio
Most of these function are identical. Only difference were basically debugging message but now with a proper tests are less important. Signed-off-by: Frediano Ziglio --- server/red-stream.c | 156 +++- 1 file changed, 32 insertions(+), 124 deletion

[Spice-devel] [PATCH spice-server v2 11/13] red-stream: Handle properly endianness in SASL code

2017-12-20 Thread Frediano Ziglio
All SPICE protocol is little endian, there's no agreement on other endian and currently we support only little endian so make sure this will work even possibly running on a big endian machine. Signed-off-by: Frediano Ziglio --- server/red-stream.c | 14 +- 1 file changed, 9 insertion

[Spice-devel] [PATCH spice-server v2 10/13] Handle SASL initialisation mainly in red-stream.c

2017-12-20 Thread Frediano Ziglio
Asynchronous code jumping from a file to another is tedious to read also having code handling the same stuff in two files does not look a good design. Signed-off-by: Frediano Ziglio --- server/red-stream.c | 118 +--- server/red-stream.h | 11 +---

[Spice-devel] [PATCH spice-server v2 13/13] red-stream: Encapsulate all authentication state in RedSASLAuth

2017-12-20 Thread Frediano Ziglio
Instead of having half state in RedSASL and half in RedSASLAuth move everything in RedSASLAuth. This also reduces memory usage when we are using SASL but we finish the authentication step. Signed-off-by: Frediano Ziglio --- server/red-stream.c | 135 +++---

[Spice-devel] [PATCH spice-server v2 09/13] test-sasl: Add tests for different failures and cases

2017-12-20 Thread Frediano Ziglio
Use some flags to specify which behaviour to change and different test cases to test them. Some cases specify when client stop sending data at different steps of the process. Signed-off-by: Frediano Ziglio --- server/tests/test-sasl.c | 198 --- 1 file

[Spice-devel] [PATCH spice-server v2 03/13] red-stream: Avoid useless copy of mechlist

2017-12-20 Thread Frediano Ziglio
The list will persist while the SASL connection is not disposed (or another sasl_listmech called). From documentation: * results: * result-- NUL terminated result which persists until next * call to sasl_listmech for this sasl_conn_t Signed-off-by: Frediano Ziglio --- serv

[Spice-devel] [PATCH spice-server v2 08/13] test-sasl: Add tests for different mechanism names

2017-12-20 Thread Frediano Ziglio
Try different connections with different tricky names. Signed-off-by: Frediano Ziglio --- server/tests/test-sasl.c | 60 1 file changed, 55 insertions(+), 5 deletions(-) diff --git a/server/tests/test-sasl.c b/server/tests/test-sasl.c index 3973e

[Spice-devel] [PATCH spice-server v2 06/13] test-sasl: Add code for mocking function to test state

2017-12-20 Thread Frediano Ziglio
Check some functions are called in a given sequence. Signed-off-by: Frediano Ziglio --- server/tests/test-sasl.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/server/tests/test-sasl.c b/server/tests/test-sasl.c index e9493f10e..4b1d778c0 100644 --- a/server/tests/test-

[Spice-devel] [PATCH spice-server v2 07/13] test-sasl: Base test, connect using SASL

2017-12-20 Thread Frediano Ziglio
Create a thread that emulate a client and start SASL authentication Signed-off-by: Frediano Ziglio --- server/tests/test-sasl.c | 236 ++- 1 file changed, 235 insertions(+), 1 deletion(-) diff --git a/server/tests/test-sasl.c b/server/tests/test-sasl.

[Spice-devel] [PATCH spice-server v2 05/13] test-sasl: Initial SASL test

2017-12-20 Thread Frediano Ziglio
Not currently working, is defining SASL functions used by the code. As the symbols defined in the objects have more priority than the ones defined by the libraries these function take precedence compared to system library. Signed-off-by: Frediano Ziglio --- server/tests/.gitignore | 1 + serv

[Spice-devel] [PATCH spice-server v2 04/13] red-stream: Avoid to specify 2 mech names during SASL

2017-12-20 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/red-stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/red-stream.c b/server/red-stream.c index bf2aff7a3..949bd74bb 100644 --- a/server/red-stream.c +++ b/server/red-stream.c @@ -985,7 +985,7 @@ bool red_sasl_handle_auth_

[Spice-devel] [PATCH spice-server v2 01/13] red-stream: Simplify mechname matching

2017-12-20 Thread Frediano Ziglio
Avoid over complicated matching using quoting and a simple strstr operation. The mech names are separated and quoted with the same chararacter (',') making possible to search for ",MECHNAME," instead of manually check for prefix and suffix after the search for "MECHNAME". Signed-off-by: Frediano Z

[Spice-devel] [PATCH spice-server v2 00/13] SASL code improvements

2017-12-20 Thread Frediano Ziglio
SASL authentication code were a bit dodgy to see. The series have basically 3 parts: - some minor fixes; - a test for SASL code; - some code refactory. The fixes were handling issues discovered looking at code and writing the tests. Test is not that straightforward, maybe some code should be put i