Re: [Spice-devel] [spice-server 4/8] test-listen: Add test case port/address configuration

2018-03-09 Thread Frediano Ziglio
> > This test case will be testing the external spice-server API to > configure the address/port it's listening on. For now it sets up a > listening server, spawns a thread which is going to connect to that > port, and check it gets the REDQ magic upon connection. It will be > extended to test

Re: [Spice-devel] [spice-server 7/8] test-listen: Add TLS test

2018-03-09 Thread Frediano Ziglio
> > --- > server/tests/test-listen.c | 106 > +++-- > 1 file changed, 103 insertions(+), 3 deletions(-) > > diff --git a/server/tests/test-listen.c b/server/tests/test-listen.c > index e88105eea..2a15df1ab 100644 > --- a/server/tests/test-listen.c > +++

Re: [Spice-devel] [spice-server 8/8] test-listen: Add Unix socket test

2018-03-09 Thread Frediano Ziglio
> > --- > configure.ac | 3 +++ > server/tests/Makefile.am | 4 +++- > server/tests/test-listen.c | 38 +++--- > 3 files changed, 41 insertions(+), 4 deletions(-) > > diff --git a/configure.ac b/configure.ac > index bcd4bb4d5..863834343 100644 >

Re: [Spice-devel] [spice-server 6/8] test-listen: Add event loop helpers

2018-03-09 Thread Frediano Ziglio
> > These factor a bit of common code, and more importantly, help with > freeing all event loop related data at the end of each test. > --- > server/tests/test-listen.c | 120 > - > 1 file changed, 86 insertions(+), 34 deletions(-) > > diff --git

Re: [Spice-devel] [spice-server 5/8] test-listen: Add connection attempt to non-open port

2018-03-09 Thread Frediano Ziglio
> > --- > server/tests/test-listen.c | 46 > +++--- > 1 file changed, 43 insertions(+), 3 deletions(-) > > diff --git a/server/tests/test-listen.c b/server/tests/test-listen.c > index 052dc0b8f..562f07487 100644 > --- a/server/tests/test-listen.c > +++

Re: [Spice-devel] [spice-server v3] reds: Close sockets when failing to watch them

2018-03-09 Thread Christophe Fergeau
On Thu, Mar 08, 2018 at 03:54:56PM +0200, Uri Lublin wrote: > On 03/08/2018 03:23 PM, Christophe Fergeau wrote: > > Currently if we fail to set up the watch waiting for accept() to be > > called on the socket, we still keep the network socket(s) open even if we > > are not going to be able to use

Re: [Spice-devel] [PATCH spice-server] ci: Fix compiling of some functions

2018-03-09 Thread Christophe Fergeau
Hey, On Thu, Mar 08, 2018 at 02:18:46PM +, Frediano Ziglio wrote: > Address sanitizer use a larger stack than normal compiled programs > making the build fails. This causes this error on GitLab CI system: > > stream-device.c: In function 'stream_device_partial_read': > stream-device.c:182:1:

[Spice-devel] [PATCH] usbredirserver : enable TCP keepalive

2018-03-09 Thread zhenwei.pi
In some bad cases, for example, host OS crashes without sending any FIN to usbredirserver, and usbredirserver will keep idle connection for a long time. We can also set the kernel arguments, it means that other processes may be affected. Setting a sensible timeout(like 10 minutes) seems good.

[Spice-devel] [PATCH] usbredirserver : enable TCP keepalive

2018-03-09 Thread zhenwei.pi
In some bad cases, for example, host OS crashes without sending any FIN to usbredirserver, and usbredirserver will keep idle connection for a long time. We can also set the kernel arguments, it means that other processes may be affected. Setting a sensible timeout(like 10 minutes) seems good.

[Spice-devel] [PATCH spice-streaming-agent] RFC: Handle endian in protocol

2018-03-09 Thread Frediano Ziglio
Use overloaded function to handle endianness without having to specify bit length every time. Signed-off-by: Frediano Ziglio --- This patch can wait other series, not really important at the moment --- src/Makefile.am | 1 + src/byteswap.hpp | 55

[Spice-devel] [PATCH spice-protocol 2/2] macros: Use Visual C++ built-ins for byte swapping if available

2018-03-09 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- spice/macros.h | 4 1 file changed, 4 insertions(+) diff --git a/spice/macros.h b/spice/macros.h index 023fd6a..ab1d056 100644 --- a/spice/macros.h +++ b/spice/macros.h @@ -252,6 +252,10 @@ # define SPICE_BYTESWAP16(val)

[Spice-devel] [PATCH spice-protocol 1/2] macros: Use GCC built-ins to swap bytes

2018-03-09 Thread Frediano Ziglio
GCC introduced __builtin_bswapXX intrinsics in a quite old version. As version 2 and 3 are no more used nowadays instead of manually craft these functions using assembly language use the new built-ins. Signed-off-by: Frediano Ziglio --- spice/macros.h | 128

Re: [Spice-devel] [PATCH spice-protocol 1/2] macros: Use GCC built-ins to swap bytes

2018-03-09 Thread Christophe Fergeau
On Fri, Mar 09, 2018 at 01:06:38PM +, Frediano Ziglio wrote: > GCC introduced __builtin_bswapXX intrinsics in a quite old > version. > As version 2 and 3 are no more used nowadays instead of manually > craft these functions using assembly language use the new built-ins. Oh yes, very happy to

Re: [Spice-devel] [PATCH spice-protocol 2/2] macros: Use Visual C++ built-ins for byte swapping if available

2018-03-09 Thread Christophe Fergeau
On Fri, Mar 09, 2018 at 01:06:39PM +, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > spice/macros.h | 4 > 1 file changed, 4 insertions(+) > > diff --git a/spice/macros.h b/spice/macros.h > index 023fd6a..ab1d056 100644 > --- a/spice/macros.h > +++

[Spice-devel] [PATCH spice-server] video-stream: Document the usage of RedUpgradeItem structure

2018-03-09 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/video-stream.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/video-stream.h b/server/video-stream.h index cf912152..e1bd0d5a 100644 --- a/server/video-stream.h +++ b/server/video-stream.h @@ -45,6 +45,8 @@ typedef