[Spice-devel] [PATCH win-vdagent v2] Don't exit when receiving unknown messages

2019-03-04 Thread Jonathon Jongsma
In 8251fa25, a check on the minimum size of a message was introduced. For unsupported messages, the vdagent simply exited. This makes it inconsistent with previous behavior and inconsistent with the behavior of the linux vdagent. Instead, just print a warning indicating that an unsupported

[Spice-devel] [PATCH spice-server v2 3/3] Switch some boolean fields to 'bool' type

2019-03-04 Thread Jonathon Jongsma
For coding style consistency, use 'bool' when we want to represent a boolean value. Signed-off-by: Jonathon Jongsma --- Changes in v2: - new patch server/reds.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/reds.c b/server/reds.c index

[Spice-devel] [PATCH spice-server v2 1/3] Refactor agent_adjust_capabilities() function

2019-03-04 Thread Jonathon Jongsma
Make this a RedsState member function rather than a standalone function. This means that we simply pass RedsState* as an argument rather than the internal member variables of RedsState. This enables the following commit which handles the VD_AGENT_CAP_GRAPHICS_DEVICE_INFO capability to avoid

[Spice-devel] [PATCH spice-server v2 2/3] Only send device display info to supported agents

2019-03-04 Thread Jonathon Jongsma
Only send the graphics device display info to agents that advertise the VD_AGENT_CAP_GRAPHICS_DEVICE_INFO capability Signed-off-by: Jonathon Jongsma --- Changes in v2: - renamed member variable - moved variable to RedCharDeviceVDIPortPrivate - reset variable when agent disconnects - make

Re: [Spice-devel] [PATCH spice-server v4 01/20] Use proper format strings for spice_log

2019-03-04 Thread Marc-André Lureau
On Wed, Feb 6, 2019 at 2:59 PM Frediano Ziglio wrote: > > Formatting string should be compatible with GLib. > GLib uses formatting types compatible with GNU. > For Linux this is not an issue as both systems (like a printf) and > GLib one uses the same formatting type. However on Windows they >

Re: [Spice-devel] [PATCH spice-server v4 02/20] build: Detect Windows build and change some definitions

2019-03-04 Thread Marc-André Lureau
On Wed, Feb 6, 2019 at 2:59 PM Frediano Ziglio wrote: > > Windows needs some specific setting to use network. > > Signed-off-by: Frediano Ziglio autotools only? Reviewed-by: Marc-André Lureau > --- > configure.ac | 20 +++- > 1 file changed, 19 insertions(+), 1 deletion(-)

Re: [Spice-devel] [PATCH spice-server v4 09/20] net-utils: Use socket compatibility layer

2019-03-04 Thread Marc-André Lureau
On Wed, Feb 6, 2019 at 2:59 PM Frediano Ziglio wrote: > > Signed-off-by: Frediano Ziglio You could easily improve the commit message, as it doesn't seem to do what it says. > --- > server/net-utils.c | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/server/net-utils.c

Re: [Spice-devel] [PATCH spice-server v4 08/20] sys-socket: Add socket_newpair utility

2019-03-04 Thread Marc-André Lureau
Hi On Wed, Feb 6, 2019 at 2:59 PM Frediano Ziglio wrote: > > Allows to easier port socketpair. > Windows does not have this function, we need to create a pair > using 2 internet sockets and connecting one to the other. > > Signed-off-by: Frediano Ziglio > --- > server/sys-socket.c | 75

Re: [Spice-devel] [PATCH spice-server v4 07/20] sys-socket: Introduce some utility to make sockets more portable

2019-03-04 Thread Marc-André Lureau
Hi On Wed, Feb 6, 2019 at 2:59 PM Frediano Ziglio wrote: > > Between Unix and Windows socket are quite different: > - on Windows sockets have a different namespace from C file > descriptors so you can't use read/write/close or similar functions; > - errors are not stored in errno but you must

Re: [Spice-devel] [PATCH spice-server v4 06/20] test-stat: Adjust delay checks

2019-03-04 Thread Marc-André Lureau
Hi On Wed, Feb 6, 2019 at 2:59 PM Frediano Ziglio wrote: > > usleep under Windows does not seem to have the required precision. > Use milliseconds and adjust check times according. > > Signed-off-by: Frediano Ziglio As discussed previously, g_usleep() would also be a good fit. I would rather

Re: [Spice-devel] [PATCH spice-server v4 04/20] windows: Undefine some conflicting preprocessor macros

2019-03-04 Thread Marc-André Lureau
Hi On Wed, Feb 6, 2019 at 2:59 PM Frediano Ziglio wrote: > > "interface" and "MAX_MONITORS" are defined in some Windows system > headers causing garbage code to be fed to the compiler. > > Signed-off-by: Frediano Ziglio To avoid the conflict, I suggest renaming those instead. > --- >

Re: [Spice-devel] [PATCH spice-server v4 03/20] Avoids %m in formatting for Windows

2019-03-04 Thread Marc-André Lureau
Hi On Wed, Feb 6, 2019 at 2:59 PM Frediano Ziglio wrote: > > Not supported, %m is a GNU extension of sscanf. > > Signed-off-by: Frediano Ziglio > --- > server/reds.c | 25 - > 1 file changed, 12 insertions(+), 13 deletions(-) > > diff --git a/server/reds.c

Re: [Spice-devel] [PATCH spice-common 8/9] protocol: Add a dummy TunnelChannel

2019-03-04 Thread Uri Lublin
On 3/3/19 9:10 PM, Frediano Ziglio wrote: The removal of the channel definition will cause the enumeration to miss this old channel. Add a dummy channel (empty) to avoid having to update spice-gtk and spice-server and possibly breaking other software. Hi Freidano, This patch should be applied

Re: [Spice-devel] [spice-gtk] usb-redir: use persistent libusb device on Windows

2019-03-04 Thread Christophe Fergeau
On Mon, Feb 25, 2019 at 04:07:03PM +0200, Yuri Benditovich wrote: > On Fri, Feb 22, 2019 at 2:06 PM Christophe Fergeau > wrote: > > I don't think we should have a hard limit on the number of lines in a > > patch, however there should be a maximum of 1 logical change per commit, > > see > >

Re: [Spice-devel] [PATCH spice-gtk 0/3] clipboard grab race

2019-03-04 Thread Victor Toso
Hi Jakub, On Thu, Feb 28, 2019 at 08:12:41PM +0100, Jakub Janků wrote: > Hi, > > this is another try to solve the grab race. > Intention of these patches is to make spice-gtk > behave reasonably well with older agents. > > The next step would be to fix the protocol itself. > But that will