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

2019-07-25 Thread Frediano Ziglio
> > 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

Re: [Spice-devel] [PATCH spice-server 1/2] test-websocket: Some Windows compatibility

2019-07-25 Thread Frediano Ziglio
ping the series > > Don't call close but socket_close. > > Signed-off-by: Frediano Ziglio > --- > server/tests/test-websocket.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > Currently the executable cannot run on Windows but it does no

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

2019-07-25 Thread Frediano Ziglio
> > 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

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 options_parse_arguments

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 bett

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/option

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 structu

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 > +++ b/sr

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 b/src/tests

[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

[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: Con

[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-vdagent-0.19.0/src/vdagent/device

[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 b

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

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

2019-07-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/red-replay-qxl.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) Changes v1: - realloc the buffer inside read_binary with the proper size. The proper size if not available in red_replay_image. diff --git a/server/red-replay-qxl.c

Re: [Spice-devel] [PATCH v2 x11spice 3/4] Bug fix: support --config= semantics.

2019-07-23 Thread Frediano Ziglio
> > Instead of trying to parse argv ourselves, just reuse getopt_long_only. > > Signed-off-by: Jeremy White This patch looks a bit long compared to the job is doing. What is the expected behaviour mixing --config and other options? It looks like the configuration file should be always read firs

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

2019-07-23 Thread Frediano Ziglio
> > Hi, > > On Wed, Jun 19, 2019 at 04:56:41PM +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. > > on Windows GP

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

2019-07-23 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

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

2019-07-23 Thread Frediano Ziglio
ping > > ping > > > > > 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. > > on Windows GPollFD::fd can be an HANDLE but not a socket.

[Spice-devel] [PATCH spice-server] Use (u)intptr_t for virtual addresses

2019-07-23 Thread Frediano Ziglio
On LLP64 platforms (like Windows) a virtual address cannot be represented by a "unsigned long" type, so use uintptr_t which is defined as a integral type large like a pointer. "address_delta" is a difference of pointers so use same type size. Signed-off-by: Frediano Ziglio -

[Spice-devel] [PATCH spice-server 2/2] replay: Remove some leak and a FIXME

2019-07-23 Thread Frediano Ziglio
Threads are joined by spice_server_destroy, just need to release last resources. Signed-off-by: Frediano Ziglio --- server/tests/replay.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/tests/replay.c b/server/tests/replay.c index 992f26d63..44f244457 100644

[Spice-devel] [PATCH spice-server 1/2] replay: Remove some goto statement

2019-07-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/tests/replay.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/server/tests/replay.c b/server/tests/replay.c index e3ef7bf15..992f26d63 100644 --- a/server/tests/replay.c +++ b/server/tests/replay.c @@ -116,7

[Spice-devel] [PATCH spice-server] red-replay-qxl: Fix replay on 32 bit systems

2019-07-23 Thread Frediano Ziglio
his issue. Note that for opposite conversion (QXLPHYSICAL_TO_PTR) the conversion does not change, type is changed just for consistency. Signed-off-by: Frediano Ziglio --- server/red-replay-qxl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/red-replay-qxl.c b/ser

Re: [Spice-devel] [spice-gtk v2 5/9] usb-redir: cosmetic changes in hotplug_callback

2019-07-23 Thread Frediano Ziglio
> > Unify parameter name for libusb_device. > Use g_return_val_if_fail for expected condition. See https://developer.gnome.org/glib/stable/glib-Warnings-and-Assertions.html#g-return-val-if-fail g_return_val_if_fail represents a bug in the code, not an "expected condition". > Remove redundant ca

Re: [Spice-devel] [PATCH spice-server 3/3] Use start/end-packet.h headers instead of direct GCC attribute

2019-07-22 Thread Frediano Ziglio
in the previous > commit. > I tested, nested attributes are needed, otherwise ABI is broken. > > Otherwise, ack for the series > > > > > > On 7/22/19 2:08 PM, Frediano Ziglio wrote: > > > All other code use these headers. > > > > > > Signed-off-b

Re: [Spice-devel] [PATCH spice-server 3/3] Use start/end-packet.h headers instead of direct GCC attribute

2019-07-22 Thread Frediano Ziglio
ries > > > On 7/22/19 2:08 PM, Frediano Ziglio wrote: > > All other code use these headers. > > > > Signed-off-by: Frediano Ziglio > > --- > > server/migration-protocol.h | 32 ++-- > > server/reds.c | 4 +++

[Spice-devel] [PATCH spice-gtk 2/2] spice-widget-egl: Declare and initialise "tex" and "verts" shortly

2019-07-22 Thread Frediano Ziglio
Just syntax change. Reduce code to initialise these matrices. Signed-off-by: Frediano Ziglio --- src/spice-widget-egl.c | 40 +--- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/src/spice-widget-egl.c b/src/spice-widget-egl.c index 7db66082

[Spice-devel] [PATCH spice-gtk 1/2] spice-widget-egl: Use sizeof instead of hand coded constant

2019-07-22 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- src/spice-widget-egl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spice-widget-egl.c b/src/spice-widget-egl.c index 7bae4e58..7db66082 100644 --- a/src/spice-widget-egl.c +++ b/src/spice-widget-egl.c @@ -129,7 +129,7 @@ static

[Spice-devel] [PATCH spice-gtk v2] usb-device-manager: Do not give warnings for supported configuration

2019-07-22 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- src/usb-device-manager.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) Changes since v1: - conver a debug into warning to inform the user at least one time diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c index 9aba275f

[Spice-devel] [PATCH spice-server 2/3] glz-encoder: Remove useless __packed__ attribute

2019-07-22 Thread Frediano Ziglio
These structure contain only bytes, no need for this attribute. Signed-off-by: Frediano Ziglio --- server/glz-encoder.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/glz-encoder.c b/server/glz-encoder.c index 341294035..ee9d95ae9 100644 --- a/server/glz

[Spice-devel] [PATCH spice-server 3/3] Use start/end-packet.h headers instead of direct GCC attribute

2019-07-22 Thread Frediano Ziglio
All other code use these headers. Signed-off-by: Frediano Ziglio --- server/migration-protocol.h | 32 ++-- server/reds.c | 4 +++- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/server/migration-protocol.h b/server/migration

[Spice-devel] [PATCH spice-server 1/3] glz-encoder-dict: Remove useless __packed__ attribute

2019-07-22 Thread Frediano Ziglio
The structure has no holes, adding this attribute could only decrease efficiency. Note that HashEntry structure is used for a large (8MB) array so this won't affect much possible container size. Signed-off-by: Frediano Ziglio --- server/glz-encoder-priv.h | 2 +- 1 file changed, 1 inse

Re: [Spice-devel] [PATCH spice-server 09/13] dispatcher: Use a new API to handle events

2019-07-22 Thread Frediano Ziglio
his has some advantage: > > > - replace 2 API with 1; > > > - code reuse for handling the event (removed 2 functions); > > > - avoid the caller to use the file descriptor; > > > - avoid the caller to register wrong events. > > > > > > Signe

Re: [Spice-devel] [PATCH 2/2] tests: rename video-encoders to test-video-encoders

2019-07-22 Thread Frediano Ziglio
Acked > > --- > server/tests/Makefile.am | 6 +++--- > server/tests/meson.build | 2 +- > server/tests/{video-encoders => test-video-encoders} | 0 > 3 files changed, 4 insertions(+), 4 deletions(-) > rename server/tests/{video-encoders =>

Re: [Spice-devel] [PATCH 1/2] ci: pre-install "file"

2019-07-22 Thread Frediano Ziglio
> > This fixes the following warning: > ./configure: line 7040: /usr/bin/file: No such file or directory > > Signed-off-by: Uri Lublin Acked > --- > .gitlab-ci.yml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml > index 316a860dd..33

Re: [Spice-devel] [PATCH v2 x11spice 1/4] Convert to the use of glib memory routines in options.c.

2019-07-22 Thread Frediano Ziglio
> > Signed-off-by: Jeremy White I didn't expected you would change everything :-) > --- > src/options.c | 44 > 1 file changed, 20 insertions(+), 24 deletions(-) > > diff --git a/src/options.c b/src/options.c > index b7f487c5..a206c92c 100644 > ---

Re: [Spice-devel] [spice-gtk 2/5] usb-redir: unify device hotplug/unplug for Windows and Linux

2019-07-22 Thread Frediano Ziglio
> > On Fri, Jul 19, 2019 at 1:14 PM Victor Toso wrote: > > > > Hi, > > > > On Sun, Jul 14, 2019 at 05:07:38PM +0300, Yuri Benditovich wrote: > > > Remove Windows-specific part of hotplug detection from > > > usb-device-manager and win-usb-dev and place it into > > > USB backend module. Connect th

Re: [Spice-devel] [PATCH v3 spice-streaming-agent] gst-plugin: receive encoder properties as command parameters

2019-07-22 Thread Frediano Ziglio
> > This allows to set plugin key=value properties on run time. > To add encoder plugin property use the following syntax: > -c gst.prop="property=value" -c gst.prop="property2=value2"... > Make sure syntax is accurate and that the property is supported by > the chosen plugin, wrong properties may

Re: [Spice-devel] [linux/vd-agent v1 7/7] vdagent: simple fix for address-of-packed-member

2019-07-19 Thread Frediano Ziglio
> > > > > From: Victor Toso > > > > Seems to be a false positive but as this message only happens when user > > client connects, we can copy this array to make compiling warn free. > > > > > src/vdagent/vdagent.c: In function ‘daemon_read_complete’: > > > src/vdagent/vdagent.c:226:71: error:

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

2019-07-19 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 should also avoid covscan/clang warnings: | spice-vdagent-0.19.0/src/vdagent/

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

2019-07-19 Thread Frediano Ziglio
driver is XDDM which means Windows XP or similars, I got no recording with such images. Signed-off-by: Frediano Ziglio --- server/red-replay-qxl.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c index 674feae2f

[Spice-devel] [PATCH spice-server v2 0/2] Remove last warnings from CI build

2019-07-19 Thread Frediano Ziglio
This small series removes last compile warnings from CI build. See https://gitlab.freedesktop.org/fziglio/spice/pipelines/49834. Second patch remove also bug reading record file for QUIC images instead of just removing the warning. Frediano Ziglio (2): red-replay-qxl: Fix some issue of

[Spice-devel] [PATCH spice-server v2 1/2] red-replay-qxl: Fix some issue of alignment

2019-07-19 Thread Frediano Ziglio
Do not pass unaligned QXLPHYSICAL but pass a valid pointer and then cast. Signed-off-by: Frediano Ziglio --- server/red-replay-qxl.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) Changes since v1: - remove unnecessary casts diff --git a/server/red-replay-qxl.c b

Re: [Spice-devel] [PATCH spice-protocol 2/2] qxl_dev: Move QXLReleaseInfoExt out of start/end-packed.h

2019-07-18 Thread Frediano Ziglio
bytes instead > of 12 this is read the same way. > > Signed-off-by: Frediano Ziglio > --- > spice/qxl_dev.h | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h > index 659f930..c844d7b 1006

Re: [Spice-devel] [PATCH spice-server] red-replay-qxl: Fix some issue of alignment

2019-07-18 Thread Frediano Ziglio
ping > > Do not pass unaligned QXLPHYSICAL but pass a valid pointer and > then cast. > > Signed-off-by: Frediano Ziglio > --- > server/red-replay-qxl.c | 16 > 1 file changed, 12 insertions(+), 4 deletions(-) > > diff --git a/server/red-replay-q

[Spice-devel] [PATCH spice-protocol] start-packet: Correct misleading comment

2019-07-18 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- spice/start-packed.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spice/start-packed.h b/spice/start-packed.h index de0c595..d1d090e 100644 --- a/spice/start-packed.h +++ b/spice/start-packed.h @@ -30,8 +30,8 @@ */ /* Ideally this

Re: [Spice-devel] [PATCH spice-protocol 1/2 v2] qxl_dev: Fix alignment for QXLReleaseInfo

2019-07-18 Thread Frediano Ziglio
> > > On 7/18/19 5:51 PM, Frediano Ziglio wrote: > >> Hi, > >> > >> > >> IIRC this was related to some compiler warning, no? > > Yes, recent compilers are reporting it, see below. > > > >> If it is I'd mentioning it , ot

Re: [Spice-devel] [PATCH x11spice 1/2] Bug fix: --config= did not work.

2019-07-18 Thread Frediano Ziglio
It seems that x11spice is more X11 complaint than getopt_long so I don't see the --config=/-config= mandatory. Giving that -config is not GNU convention (they are 5 options!) I would avoid the mix. > > Signed-off-by: Jeremy White > --- > src/options.c | 24 ++-- > 1 file ch

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

2019-07-18 Thread Frediano Ziglio
> > 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 0d3138d0..cf75e54e 100644 > --- a/src/options.c > +++ b/src/options.c > @@ -355,7 +355,9 @@ int options_parse_arguments(int arg

Re: [Spice-devel] [PATCH spice-protocol 1/2 v2] qxl_dev: Fix alignment for QXLReleaseInfo

2019-07-18 Thread Frediano Ziglio
> > Hi, > > > IIRC this was related to some compiler warning, no? Yes, recent compilers are reporting it, see below. > If it is I'd mentioning it , otherwise, ack. > Just this patch or the entire series? > Snir. > > > On 7/4/19 4:56 PM, Fredian

Re: [Spice-devel] [PATCH spice-server 3/3] ci: Add some Valgrind suppressions for Fedora 30

2019-07-18 Thread Frediano Ziglio
> > On 7/18/19 10:32 AM, Frediano Ziglio wrote: > > Signed-off-by: Frediano Ziglio > > Hi Frediano, > > I've been playing with it too. > Had similar rules but different. > > Your version works for me. > Some minor comments below. > > &g

Re: [Spice-devel] [PATCH spice-server 06/13] red-channel: Inline red_channel_pipes_create_batch

2019-07-18 Thread Frediano Ziglio
ping > > ping > > > > > ping > > > > > > > > The function is called only by red_channel_pipes_new_add. > > > > > > Signed-off-by: Frediano Ziglio > > > --- > > > server/red-channel.c | 20 ---

Re: [Spice-devel] [PATCH spice-server v2 1/4] spicevmc: Do not use RedCharDevice pipe items handling

2019-07-18 Thread Frediano Ziglio
a single queue for the network interface > > limiting and sharing de facto the various buffers between the multiple > > connections. > > > > Signed-off-by: Frediano Ziglio > > --- > > Changes in v2: > > - more commit message comments > > --- >

Re: [Spice-devel] [PATCH spice-server 03/13] char-device: Allocate all write buffer in a single block

2019-07-18 Thread Frediano Ziglio
ping > > ping > > > > > ping > > > > > > > > There are no much data other than the buffer, reduce the > > > allocations. > > > > > > Signed-off-by: Frediano Ziglio > > > --- > > > server/char-de

Re: [Spice-devel] [PATCH spice-server v2] char-device: Remove unused red_char_device_destroy function

2019-07-18 Thread Frediano Ziglio
ping > > ping > > > > > ping > > > > > > > > ping > > > > > > > > > > > ping > > > > > > > > > > > > > > ping > > > > > > > > > > >

Re: [Spice-devel] [PATCH spice-server 13/13] red-channel-client: Add some comment on the flush code

2019-07-18 Thread Frediano Ziglio
ping > > ping > > > > > ping > > > > > > > > ping > > > > > > > > > > > ping > > > > > > > > > > > > > > Signed-off-by: Frediano Ziglio > > > > > --- &g

Re: [Spice-devel] [PATCH spice-server 02/13] char-device: Pull more code into red_char_device_send_to_client_tokens_absorb

2019-07-18 Thread Frediano Ziglio
ce_send_to_client_tokens_add are doing mostly > > > > the same thing so put common code to > > > > red_char_device_send_to_client_tokens_absorb. > > > > > > > > Signed-off-by: Frediano Ziglio > > > > --- > > > > server/char-device.c | 42 +++

Re: [Spice-devel] [PATCH spice-server v2 1/2] char-device: Don't use RedClient API

2019-07-18 Thread Frediano Ziglio
; > > than RedClient. > > > > The define at the beginning of C file is to make sure we don't > > > > use the opaque type as a specific one. > > > > > > > > Signed-off-by: Frediano Ziglio > > > > --- > > > > server/char-device.c

Re: [Spice-devel] [PATCH spice-server 05/13] red-worker: Remove warning

2019-07-18 Thread Frediano Ziglio
defined by the compiler > > > > > and defining again cause a warning. > > > > > Do not define again to avoid the warning. > > > > > > > > > > Signed-off-by: Frediano Ziglio > > > > > --- > > > > > server/red-worker.c | 2 ++ >

Re: [Spice-devel] [PATCH spice-server 12/13] red-channel-client: Reduce indentation of some code

2019-07-18 Thread Frediano Ziglio
ping > > ping > > > > > ping > > > > > > > > ping > > > > > > > > > > > Just a style change, return earlier to avoid some indentation. > > > > > > > > Signed-off-by: Frediano Ziglio

Re: [Spice-devel] [PATCH spice-server 04/13] spicevmc: Remove reds parameter from spicevmc_device_disconnect

2019-07-18 Thread Frediano Ziglio
ping > > ping > > > > > ping > > > > > > > > ping > > > > > > > > > > > ping > > > > > > > > > > > > > > Unused. > > > > > Also the devices shoul

[Spice-devel] [PATCH spice-server 1/3] ci: Separate SPICE specific Valgrind suppression

2019-07-18 Thread Frediano Ziglio
Previously we add suppression to glib.supp file (suppressions from Glib). Keep the glib.supp file pristine and add another file specific for SPICE. Signed-off-by: Frediano Ziglio --- server/tests/Makefile.am | 2 +- server/tests/valgrind/glib.supp | 39

[Spice-devel] [PATCH spice-server 2/3] ci: Update glib.supp file

2019-07-18 Thread Frediano Ziglio
Sync with Glib master file. Signed-off-by: Frediano Ziglio --- server/tests/valgrind/glib.supp | 222 +++- 1 file changed, 220 insertions(+), 2 deletions(-) diff --git a/server/tests/valgrind/glib.supp b/server/tests/valgrind/glib.supp index 9236b3d16..ddc2b1729

[Spice-devel] [PATCH spice-server 0/3] Update Valgrind suppression files

2019-07-18 Thread Frediano Ziglio
This series split and update Valgrind suppression files in order for make Gitlab CI pass. Results at https://gitlab.freedesktop.org/fziglio/spice/-/jobs/430006. Note that to pass Valgrind checks some other patches are needed but these series is complete for the suppression part. Frediano Ziglio

[Spice-devel] [PATCH spice-server 3/3] ci: Add some Valgrind suppressions for Fedora 30

2019-07-18 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/tests/valgrind/spice.supp | 25 + 1 file changed, 25 insertions(+) diff --git a/server/tests/valgrind/spice.supp b/server/tests/valgrind/spice.supp index 1bfe81006..dd3663c68 100644 --- a/server/tests/valgrind/spice.supp +++ b

Re: [Spice-devel] [PATCH v2 spice-streaming-agent] gst-plugin: receive encoder properties as command parameters

2019-07-17 Thread Frediano Ziglio
> > From: test > > This allows to set plugin key=value properties on run time. > To add encoder plugin property use the following syntax: > -c gst.prop="property=value" -c gst.prop="property2=value2"... > Make sure syntax is accurate and that the property is supported by > the chosen plugin, wro

Re: [Spice-devel] [PATCH spice-streaming-agent] gst-plugin: receive encoder properties as command parameters

2019-07-17 Thread Frediano Ziglio
> Hi, > > > On 7/16/19 2:35 PM, Frediano Ziglio wrote: > >> This allows to set plugin key=value properties on run time. > >> To add encoder plugin property use the following syntax: > >> -gst.prop="key=value" > >> Make sure syntax is accu

[Spice-devel] [PATCH spice-server v3] ci: Workaround an issue with GLib on Fedora 30

2019-07-17 Thread Frediano Ziglio
mage. On a fully installed Desktop/Server machine these configuration are usually in place so you won't note the issue but on recent docker images these configuration are missing. Running the dconf command add required configuration. Signed-off-by: Frediano Ziglio --- .gitlab-ci.yml | 7

[Spice-devel] [PATCH spice-server v2] ci: Workaround an issue with GLib on Fedora 30

2019-07-17 Thread Frediano Ziglio
mage. On a fully installed Desktop/Server machine these configuration are usually in place so you won't note the issue but on recent docker images these configuration are missing. Running the dconf command add required configuration. Signed-off-by: Frediano Ziglio --- .gitlab-ci.yml | 5 +

[Spice-devel] [PATCH spice-server] websocket: Include proper type header

2019-07-17 Thread Frediano Ziglio
inttypes.h contains macro for format string while stdint.h more specifically contains type definitions (like uint8_t). Signed-off-by: Frediano Ziglio --- server/websocket.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/websocket.h b/server/websocket.h index

[Spice-devel] [PATCH spice-server] reds: Fix use-after-free

2019-07-17 Thread Frediano Ziglio
video_codecs can be freed so use it before. Signed-off-by: Frediano Ziglio --- server/reds.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/reds.c b/server/reds.c index 817fdd423..78bbe5a0f 100644 --- a/server/reds.c +++ b/server/reds.c @@ -3851,6 +3851,10

[Spice-devel] [PATCH spice-server 2/2] test-websocket: Reuse red_socket_set_non_blocking

2019-07-17 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/tests/test-websocket.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/server/tests/test-websocket.c b/server/tests/test-websocket.c index e74cb5497..432aeee5c 100644 --- a/server/tests/test-websocket.c +++ b/server

[Spice-devel] [PATCH spice-server 1/2] test-websocket: Some Windows compatibility

2019-07-17 Thread Frediano Ziglio
Don't call close but socket_close. Signed-off-by: Frediano Ziglio --- server/tests/test-websocket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Currently the executable cannot run on Windows but it does not hurt to make the source more compatible with that system. diff --

[Spice-devel] [PATCH spice-server] ci: Workaround an issue with GLib on Fedora 30

2019-07-17 Thread Frediano Ziglio
mage. On a fully installed Desktop/Server machine these configuration are usually in place so you won't note the issue but on recent docker images these configuration are missing. Running the dconf command add required configuration. Signed-off-by: Frediano Ziglio --- .gitlab-ci.yml | 2 ++ 1

Re: [Spice-devel] [PATCH spice-server 1/2] websocket: Add header guards

2019-07-16 Thread Frediano Ziglio
ping the series > > ping the series > > > > > Signed-off-by: Frediano Ziglio > > --- > > server/websocket.h | 5 + > > 1 file changed, 5 insertions(+) > > > > diff --git a/server/websocket.h b/server/websocket.h > > index

Re: [Spice-devel] [PATCH spice-protocol 1/2 v2] qxl_dev: Fix alignment for QXLReleaseInfo

2019-07-16 Thread Frediano Ziglio
y change the alignment from 4/8 to 1. > This could affect structures containing this union however beside > packed structure in qxl_dev.h (which are not affected) there are no > other usages affecting ABI by spice-gtk, Qemu or spice-server. > > Signed-off-by: Frediano Ziglio

Re: [Spice-devel] [PATCH spice-streaming-agent] gst-plugin: receive encoder properties as command parameters

2019-07-16 Thread Frediano Ziglio
> > This allows to set plugin key=value properties on run time. > To add encoder plugin property use the following syntax: > -gst.prop="key=value" > Make sure syntax is accurate and that the property is supported by > the chosen plugin, wrong/invalid properties will be ignored silently. > Specifi

Re: [Spice-devel] [spice-gtk 4/5] usb-redir: delete usb-backend context on initialization error

2019-07-15 Thread Frediano Ziglio
> > On Mon, Jul 15, 2019 at 5:04 PM Frediano Ziglio wrote: > > > > > > > > The delete in error flow was missing. > > > > > > Signed-off-by: Yuri Benditovich > > > --- > > > src/usb-device-manager.c | 1 + > > > 1 file

Re: [Spice-devel] [spice-gtk 1/5] build: require minimal libusb version 1.0.21

2019-07-15 Thread Frediano Ziglio
> > Previous commit ca641a5b92 uses libusb_interrupt_event_handler > which requires newer version of libusb. > > Signed-off-by: Yuri Benditovich My fault. According to repology this should not be an issue. Fine for me. > --- > meson.build | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(

Re: [Spice-devel] [spice-gtk 3/5] usb-redir: pass GError to hotplug registration procedure

2019-07-15 Thread Frediano Ziglio
> > In case of possible error the procedure of hotplug > registration does not return error information, just > issues warning to the stderr, so the reason of the problem, > if any, is not visible. Current commit adds GError parameter > to the procedure to return the error details conventionally.

Re: [Spice-devel] [spice-gtk 4/5] usb-redir: delete usb-backend context on initialization error

2019-07-15 Thread Frediano Ziglio
> > The delete in error flow was missing. > > Signed-off-by: Yuri Benditovich > --- > src/usb-device-manager.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c > index 857d057..7105ff1 100644 > --- a/src/usb-device-manager.c > +++ b/s

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

2019-07-15 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/3] x11: Avoid passing XEvent as value

2019-07-15 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 b

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

2019-07-15 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

Re: [Spice-devel] [linux/vd-agent v1 6/7] x11-randr: simplest fix for address-of-packed-member

2019-07-15 Thread Frediano Ziglio
> > Hi, > > On Mon, Jul 15, 2019 at 05:18:17AM -0400, Frediano Ziglio wrote: > > > > > > From: Victor Toso > > > > > > The struct type for width/height is uint32_t while we are trying to > > > access and change it with int* - code can

Re: [Spice-devel] [PATCH x11spice] Add cache for SHM segments

2019-07-15 Thread Frediano Ziglio
> > Add a cache to allow the reuse of SHM segments. > Shared memory segments are added to the cache instead of being > deallocated, and the cache is searched instead of/before allocating a > new segment. > > Both the SHM segments and their attachment with the X server are cached. > > The cache c

Re: [Spice-devel] [linux/vd-agent v1 7/7] vdagent: simple fix for address-of-packed-member

2019-07-15 Thread Frediano Ziglio
> > From: Victor Toso > > Seems to be a false positive but as this message only happens when user > client connects, we can copy this array to make compiling warn free. > > > src/vdagent/vdagent.c: In function ‘daemon_read_complete’: > > src/vdagent/vdagent.c:226:71: error: taking address of

Re: [Spice-devel] [linux/vd-agent v1 6/7] x11-randr: simplest fix for address-of-packed-member

2019-07-15 Thread Frediano Ziglio
> > From: Victor Toso > > The struct type for width/height is uint32_t while we are trying to > access and change it with int* - code can be improved a bit in following > patches but this one fixes the warning by copying the value from the > struct and copying back new value afterwards. > > Als

Re: [Spice-devel] [linux/vd-agent v1 5/7] coverity: allow pass by value with XEvent

2019-07-15 Thread Frediano Ziglio
> Subject: [Spice-devel] [linux/vd-agent v1 5/7] coverity: allow pass by value > with XEvent I would say that this patch is ignoring a warning, the code is compiling. > > From: Victor Toso > > Signed-off-by: Victor Toso > --- > src/vdagent/x11-randr.c | 4 ++-- > src/vdagent/x11.c | 1

Re: [Spice-devel] [linux/vd-agent v1 4/7] x11-randr: use glib's MAX and MIN

2019-07-15 Thread Frediano Ziglio
> > From: Victor Toso > > Since 2861868 "randr: remove monitors.xml on auto-configuration" in > 2015-04-10 by Marc-Andre Lureau this > file includes glib.h and can remove those helpers. > > Signed-off-by: Victor Toso > --- > src/vdagent/x11-randr.c | 18 -- > 1 file changed,

Re: [Spice-devel] [linux/vd-agent v1 3/7] covscan: check return value of fprintf

2019-07-15 Thread Frediano Ziglio
> > From: Victor Toso > > | Error: CHECKED_RETURN (CWE-252): > | spice-vdagent-0.19.0/src/vdagentd/vdagentd.c:999: check_return: Calling > | "fprintf" without checking return value (as is done elsewhere 29 out of > | 30 times). > | spice-vdagent-0.19.0/src/vdagentd/xorg-conf.c:95: example_a

Re: [Spice-devel] [linux/vd-agent v1 2/7] vdagent: fix memory leak of g_memdup()

2019-07-15 Thread Frediano Ziglio
> > From: Victor Toso > > Found by covscan: > > | spice-vdagent-0.19.0/src/vdagent/vdagent.c:432:9: warning: Potential leak > | of memory pointed to by 'orig_argv' > | #g_printerr("Invalid arguments, %s\n", error->message); > | #^ > | spice-vdagent-0.19.0/src/vdagent/vdagen

Re: [Spice-devel] [PATCH x11spice v2] Fix hang when launching with invalid config

2019-07-15 Thread Frediano Ziglio
> > When launching with no config file or arguments, the "You must provide > some authentication method" dialog appears. Clicking the Close button > would hang the application and it would never quit. > > s->draw_command_in_progress was uninitialized, and flush_and_lock() > would get stuck in an

Re: [Spice-devel] [PATCH x11spice] Fix segfault when quitting with Quit button

2019-07-12 Thread Frediano Ziglio
> > Quitting with the Quit button or closing the window always causes a > segfault for me. Destroying the surface before removing the interface > seems to resolve the problem. > Acked. The surface surely was of the only display interface available. > log from valgrind: > ==7741== Invalid read o

Re: [Spice-devel] [PATCH x11spice] Fix hang when launching with invalid config

2019-07-12 Thread Frediano Ziglio
> > When launching with no config file or arguments, the "You must provide > some authentication method" dialog appears. Clicking the Close button > would hang the application and it would never quit. > > s->draw_command_in_progress was uninitialized, and flush_and_lock() > would get stuck in an

Re: [Spice-devel] [PATCH spice-gtk 6/7] usb-device-manager: Do not give warnings for supported configuration

2019-07-11 Thread Frediano Ziglio
> > Hi, > > On Thu, Jul 11, 2019 at 02:00:53PM +0100, Frediano Ziglio wrote: > > Signed-off-by: Frediano Ziglio > > --- > > src/usb-device-manager.c | 12 +--- > > 1 file changed, 9 insertions(+), 3 deletions(-) > > > > diff --git a/src

Re: [Spice-devel] [PATCH spice-gtk 7/7] usb-device-manager: Last chance to avoid deadlock handling libusb events

2019-07-11 Thread Frediano Ziglio
> > Hi, > > On Thu, Jul 11, 2019 at 02:00:54PM +0100, Frediano Ziglio wrote: > > Attempt to better interrupt event handling loop. > > If the thread handling events is stuck waiting events or handling an > > event try to interrupt before joining the thread.

<    4   5   6   7   8   9   10   11   12   13   >