[Spice-devel] [PATCH v2 fixup1 x11spice 2/3] Simplify the expression of argument parsing.

2019-07-24 Thread Jeremy White
This fixes a bug with --config=handling. Signed-off-by: Jeremy White --- v2: Simplify even further. --- src/main.c| 8 + src/options.c | 96 --- src/options.h | 5 +-- 3 files changed, 47 insertions(+), 62 deletions(-) diff --git

Re: [Spice-devel] [PATCH fixup1 x11spice 2/3] Simplify the expression of argument parsing.

2019-07-24 Thread Jeremy White
On 7/24/19 9:59 AM, Frediano Ziglio wrote: This fixes a bug with --config=handling. This also includes test code courtesy of Frediano Ziglio . This was very experiment patch, just worked. I would turn it in a real test as there's a tests directory. It seems is using just exported APIs so

Re: [Spice-devel] [PATCH fixup1 x11spice 3/3] Bug fix: a listen specification from the config file was ignored

2019-07-24 Thread Frediano Ziglio
> > Signed-off-by: Jeremy White Acked > --- > src/options.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/options.c b/src/options.c > index 6620b853..64e6ac95 100644 > --- a/src/options.c > +++ b/src/options.c > @@ -327,7 +327,9 @@ int

Re: [Spice-devel] [PATCH fixup1 x11spice 2/3] Simplify the expression of argument parsing.

2019-07-24 Thread Frediano Ziglio
> > This fixes a bug with --config=handling. > > This also includes test code courtesy of Frediano Ziglio > . This was very experiment patch, just worked. I would turn it in a real test as there's a tests directory. It seems is using just exported APIs so maybe would be better to put a new test

Re: [Spice-devel] [PATCH fixup1 x11spice 1/3] Simplify string options and make sure they are freed when replaced.

2019-07-24 Thread Frediano Ziglio
> > This is largely the work of Frediano Ziglio . > > Signed-off-by: Jeremy White Fine for me, ack > --- > src/options.c | 118 +++--- > 1 file changed, 54 insertions(+), 64 deletions(-) > > diff --git a/src/options.c b/src/options.c > index

[Spice-devel] [PATCH fixup1 x11spice 2/3] Simplify the expression of argument parsing.

2019-07-24 Thread Jeremy White
This fixes a bug with --config=handling. This also includes test code courtesy of Frediano Ziglio . Signed-off-by: Jeremy White --- src/main.c| 8 +++-- src/options.c | 91 ++- src/options.h | 1 - 3 files changed, 82 insertions(+), 18

[Spice-devel] PATCH fixup1 for x11spice 0/3

2019-07-24 Thread Jeremy White
Frediano and I had a slight collision in patch processing. This set of three patches should build on the patches he committed to bring the tree to the state intended by the last patch series. ___ Spice-devel mailing list

[Spice-devel] [PATCH fixup1 x11spice 1/3] Simplify string options and make sure they are freed when replaced.

2019-07-24 Thread Jeremy White
This is largely the work of Frediano Ziglio . Signed-off-by: Jeremy White --- src/options.c | 118 +++--- 1 file changed, 54 insertions(+), 64 deletions(-) diff --git a/src/options.c b/src/options.c index 6c6ecb4e..cff4ac17 100644 --- a/src/options.c

[Spice-devel] [PATCH fixup1 x11spice 3/3] Bug fix: a listen specification from the config file was ignored

2019-07-24 Thread Jeremy White
Signed-off-by: Jeremy White --- src/options.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/options.c b/src/options.c index 6620b853..64e6ac95 100644 --- a/src/options.c +++ b/src/options.c @@ -327,7 +327,9 @@ int options_parse_arguments(int argc, char *argv[],

Re: [Spice-devel] [PATCH spice-server v2] red-parse-qxl: Fix QUIC images from QXL

2019-07-24 Thread Frediano Ziglio
> > Hi Frediano, > > On 7/23/19 11:21 PM, Frediano Ziglio wrote: > > The decoding is wrong, the Red and QXL structures are different so > > code is not doing what is expected. red-parse-qxl translate from QXL > > to Red structures, red-record-qxl saves Red structure to file, > > red-replay-qxl

Re: [Spice-devel] [PATCH spice-server v2] red-parse-qxl: Fix QUIC images from QXL

2019-07-24 Thread Uri Lublin
Hi Frediano, On 7/23/19 11:21 PM, Frediano Ziglio wrote: The decoding is wrong, the Red and QXL structures are different so code is not doing what is expected. red-parse-qxl translate from QXL to Red structures, red-record-qxl saves Red structure to file, red-replay-qxl is supposed to read from

[Spice-devel] [spice-gtk 1/9] usb-redir: define interfaces to support emulated devices

2019-07-24 Thread Yuri Benditovich
SpiceUsbBackendDevice structure is extended to support additional kind of device that is emulated by Spice-GTK and not present locally (and does not have libusb_device), such device has instead pointer to SpiceUsbEmulatedDevice abstract structure. Specific implementation of such device depends on

[Spice-devel] [spice-gtk 4/9] usb-redir: device description for emulated devices

2019-07-24 Thread Yuri Benditovich
Ability to retrieve device description for emulated USB device, defined by implementation. For example, for shared CD the implementation may use basename of ISO file. Signed-off-by: Yuri Benditovich --- src/usb-device-manager.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-)

[Spice-devel] [spice-gtk 3/9] usb-redir: Prepare for creation of emulated CD drive

2019-07-24 Thread Yuri Benditovich
Added command-line option for shared CD devices and respective property in usb-device-manager. Signed-off-by: Yuri Benditovich --- src/spice-option.c | 15 +++ src/usb-device-manager.c | 33 + 2 files changed, 48 insertions(+) diff --git

[Spice-devel] [spice-gtk 8/9] usb-redir: add implementation of emulated CD device

2019-07-24 Thread Yuri Benditovich
This module contains implementation of emulated device interface for shared CD. Signed-off-by: Yuri Benditovich --- src/usb-device-cd.c | 794 1 file changed, 794 insertions(+) create mode 100644 src/usb-device-cd.c diff --git a/src/usb-device-cd.c

[Spice-devel] [spice-gtk 9/9] usb-redir: enable redirection of emulated CD drive

2019-07-24 Thread Yuri Benditovich
Register constructor for emulated CD device. Now creation of CD devices at startup is possible. Signed-off-by: Yuri Benditovich --- src/meson.build | 6 ++ src/usb-backend.c | 1 + 2 files changed, 7 insertions(+) diff --git a/src/meson.build b/src/meson.build index 49fec52..944b083

[Spice-devel] [spice-gtk 0/9] added feature of sharing CD image

2019-07-24 Thread Yuri Benditovich
This series of patches adds feature of sharing CD image via redirection of emulated CD device. Currently the trigger to create the device is command-line option: '--spice-share-cd Yuri Benditovich (9): usb-redir: define interfaces to support emulated devices usb-redir: device error signal

[Spice-devel] [spice-gtk 6/9] usb-redir: extend USB backend to support emulated devices

2019-07-24 Thread Yuri Benditovich
Redirection of emulated devices requires special approach, as usbredirhost can't be used for that (it works only with libusb devices). For emulated devices we create instance of usbredirparser that implements USB redirection protocol. In order to work with the same set of protocol capabilities

[Spice-devel] [spice-gtk 5/9] usb-redir: do not use spice_usb_acl_helper for emulated devices

2019-07-24 Thread Yuri Benditovich
Signed-off-by: Yuri Benditovich --- src/channel-usbredir.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/channel-usbredir.c b/src/channel-usbredir.c index 8d4cd66..961a464 100644 --- a/src/channel-usbredir.c +++ b/src/channel-usbredir.c

[Spice-devel] [spice-gtk 2/9] usb-redir: device error signal without device object

2019-07-24 Thread Yuri Benditovich
Add ability to indicate error to external modules via 'device error' signal when real SpiceUsbDevice is not passed. This is needed to indicate error during creation of emulated device, when the device is not created yet. For that we allocate temporary SpiceUsbDevice structure with backend device

Re: [Spice-devel] [PATCH spice-server v2] event loop: improve implementation of watches for Unix systems

2019-07-24 Thread Victor Toso
Hi, On Wed, Jul 24, 2019 at 10:28:23AM +0100, Frediano Ziglio wrote: > Avoid having to destroy and create a new GSource every time > we change event mask. > Interfaces required for this patch are available since GLib 2.36 > and are specific to Unix. > On use old implementation. > >

Re: [Spice-devel] [PATCH x11spice] Use C99 struct initializiers instead of memset for local structures.

2019-07-24 Thread Frediano Ziglio
> > Signed-off-by: Jeremy White Acked > --- > src/gui.c| 3 +-- > src/listen.c | 3 +-- > src/main.c | 4 +--- > src/spice.c | 3 +-- > 4 files changed, 4 insertions(+), 9 deletions(-) > > diff --git a/src/gui.c b/src/gui.c > index 6748f66e..88acf5c9 100644 > --- a/src/gui.c > +++

Re: [Spice-devel] [PATCH x11spice] Fix a bug in the tests.

2019-07-24 Thread Frediano Ziglio
> > We were overly dependent on timing for success; now we > deliberately wait for our GC and drawing to finish. > > Signed-off-by: Jeremy White Acked > --- > src/tests/xcb.c | 15 +++ > 1 file changed, 11 insertions(+), 4 deletions(-) > > diff --git a/src/tests/xcb.c

[Spice-devel] [PATCH spice-server v2] event loop: improve implementation of watches for Unix systems

2019-07-24 Thread Frediano Ziglio
Avoid having to destroy and create a new GSource every time we change event mask. Interfaces required for this patch are available since GLib 2.36 and are specific to Unix. On use old implementation. Signed-off-by: Frediano Ziglio --- Changes since v1: - Use g_source_add_unix_fd and family

Re: [Spice-devel] [PATCH vd_agent_linux 0/5] Minor patches for analyzers tools

2019-07-24 Thread Victor Toso
Hi, On Wed, Jul 24, 2019 at 09:21:27AM +0100, Frediano Ziglio wrote: > These patches mainly remove some warnings detected by Coverity > and clang code analyzer. > It's a collection of different patches on the same topic, one > initially written by Victor. Thanks for amending the fix, series

Re: [Spice-devel] [spice-gtk v3 0/4] usb-redir: unification of Linux and Windows code

2019-07-24 Thread Victor Toso
Hi, On Tue, Jul 23, 2019 at 06:13:45PM +0300, Yuri Benditovich wrote: > This series is dedicated to unification of Linux Windows flows > in usb-device-manager. It moves differences related to libusb > to USB backend module and simplifies implementation of procedures > related to USB redirection.

[Spice-devel] [PATCH vd_agent_linux 1/5] x11-randr: Avoid passing XEvent as value

2019-07-24 Thread Frediano Ziglio
The structure is not that small and is not necessary to copy the value. This also removed a Coverity warning. Signed-off-by: Frediano Ziglio --- src/vdagent/x11-priv.h | 2 +- src/vdagent/x11-randr.c | 8 src/vdagent/x11.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-)

[Spice-devel] [PATCH vd_agent_linux 0/5] Minor patches for analyzers tools

2019-07-24 Thread Frediano Ziglio
These patches mainly remove some warnings detected by Coverity and clang code analyzer. It's a collection of different patches on the same topic, one initially written by Victor. Frediano Ziglio (4): x11-randr: Avoid passing XEvent as value x11: Avoid passing XEvent as value x11: Constify

[Spice-devel] [PATCH vd_agent_linux 5/5] x11: Change check to make code scanners not giving warning

2019-07-24 Thread Frediano Ziglio
Some code scanners (both Coverity and clang one) report that prev_sel/prev_cond could be unreferenced while NULL. Change condition to make clear a NULL pointer is not used. Signed-off-by: Frediano Ziglio --- src/vdagent/x11.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff

[Spice-devel] [PATCH vd_agent_linux 4/5] device-info: remove g_list_length() on compare_addresses()

2019-07-24 Thread Frediano Ziglio
From: Victor Toso The g_list_length() function does iterate over both lists to compare its length. Considering that we use this to check for true/false and we will iterate again on both lists, we can do so once. This also avoids covscan/clang warnings: |

[Spice-devel] [PATCH vd_agent_linux 3/5] x11: Constify XEvent argument

2019-07-24 Thread Frediano Ziglio
No reasons to have it mutable. Signed-off-by: Frediano Ziglio --- src/vdagent/x11.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/vdagent/x11.c b/src/vdagent/x11.c index 42f42e7..966ea62 100644 --- a/src/vdagent/x11.c +++ b/src/vdagent/x11.c

[Spice-devel] [PATCH vd_agent_linux 2/5] x11: Avoid passing XEvent as value

2019-07-24 Thread Frediano Ziglio
The structure is not that small and is not necessary to copy the value. This also removed a Coverity warning. Signed-off-by: Frediano Ziglio --- src/vdagent/x11.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/vdagent/x11.c

Re: [Spice-devel] [PATCH vd_agent_linux 1/3] x11-randr: Avoid passing XEvent as value

2019-07-24 Thread Frediano Ziglio
ping the series > > The structure is not that small and is not necessary to copy > the value. > This also removed a Coverity warning. > > Signed-off-by: Frediano Ziglio > --- > src/vdagent/x11-priv.h | 2 +- > src/vdagent/x11-randr.c | 8 > src/vdagent/x11.c | 2 +- > 3 files