Re: [Spice-devel] [vdagent-win PATCH v4 5/5] Add test for PNG files

2017-07-17 Thread Frediano Ziglio
> > On Mon, Jul 17, 2017 at 05:21:29AM -0400, Frediano Ziglio wrote: > > > > > > Test various image and formats. > > > The idea is to decode and encode again an image and > > > check for differences. ImageMagick is used to create > > > some test image and compare results. > > > Wine is used to

[Spice-devel] [spice-gtk] cursor: Add sanity checks for hotspot x/y values

2017-07-17 Thread Christophe Fergeau
The cursor hotspot values have to be inside the cursor bounding box, otherwise on X11 this may cause a crash of the application using spice-gtk. This is the client-side part of https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864998 Signed-off-by: Christophe Fergeau ---

[Spice-devel] [spice-gtk] build-sys: Lower gettext requirement

2017-07-17 Thread Christophe Fergeau
spice-gtk currently requires gettext 0.19 which is a fairly recent release (not available in el7.3 and older, nor in ubuntu 14.04 LTS). They both have a gettext newer than 0.18.2, so we can require that. Requiring 0.18 or 0.18.1 is throwing automake errors because of our use of -Werror, so we

Re: [Spice-devel] [PATCH spice-gtk v2] spice-gtk: Use time comparisons that still work after wraparound

2017-07-17 Thread Christophe de Dinechin
> On 17 Jul 2017, at 13:49, Christophe Fergeau > wrote: > > On Mon, Jul 17, 2017 at 11:44:04AM +0200, Christophe de Dinechin wrote: >> From: Christophe de Dinechin > > >> >> The mm timer is a

Re: [Spice-devel] [spice-gtk] build-sys: Lower gettext requirement

2017-07-17 Thread Marc-André Lureau
- Original Message - > spice-gtk currently requires gettext 0.19 which is a fairly recent > release (not available in el7.3 and older, nor in ubuntu 14.04 LTS). > They both have a gettext newer than 0.18.2, so we can require that. > > Requiring 0.18 or 0.18.1 is throwing automake errors

Re: [Spice-devel] [spice-gtk] build-sys: Lower gettext requirement

2017-07-17 Thread Marc-André Lureau
- Original Message - > spice-gtk currently requires gettext 0.19 which is a fairly recent > release (not available in el7.3 and older, nor in ubuntu 14.04 LTS). > They both have a gettext newer than 0.18.2, so we can require that. > > Requiring 0.18 or 0.18.1 is throwing automake errors

Re: [Spice-devel] [PATCH spice-gtk 1/2] display: factor out initialization of stream array

2017-07-17 Thread Christophe Fergeau
On Fri, Jun 30, 2017 at 12:51:16PM +0200, Victor Toso wrote: > From: Victor Toso > > Including some comment about current implementation of stream-id value > in the Spice. > > Signed-off-by: Victor Toso > --- > src/channel-display.c | 42

Re: [Spice-devel] [PATCH spice-gtk 1/2] display: factor out initialization of stream array

2017-07-17 Thread Victor Toso
Hi, On Mon, Jul 17, 2017 at 12:52:41PM +0200, Christophe Fergeau wrote: > On Fri, Jun 30, 2017 at 12:51:16PM +0200, Victor Toso wrote: > > From: Victor Toso > > > > Including some comment about current implementation of stream-id value > > in the Spice. > > > >

Re: [Spice-devel] [PATCH spice-gtk] Revert "Ignore modifiers messages if no modifiers changed"

2017-07-17 Thread Victor Toso
Hi Pavel, On Tue, Jul 11, 2017 at 01:34:12PM +0200, Pavel Grunt wrote: > This reverts commit 73cd553fb0fbd213b64d72f8b4289ed8a17fc6c0. Which is: "This avoid keep sending modifiers changes if guest is not synchronising the changes. I consider this as an improving as this avoids client to

Re: [Spice-devel] [PATCH spice-gtk v2] spice-gtk: Use time comparisons that still work after wraparound

2017-07-17 Thread Christophe Fergeau
On Mon, Jul 17, 2017 at 11:44:04AM +0200, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > The mm timer is a millisecond timer that wraps around after ~49 days. > All comparisons that look like a Instead, use signed ((int)(a-b)<0), which may fail if there is

Re: [Spice-devel] [spice-gtk] cursor: Add sanity checks for hotspot x/y values

2017-07-17 Thread Marc-André Lureau
Hi - Original Message - > The cursor hotspot values have to be inside the cursor bounding box, > otherwise on X11 this may cause a crash of the application using > spice-gtk. > > This is the client-side part of > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864998 > >

Re: [Spice-devel] [vdagent-win PATCH 4/4] imagetest: replace assert with printf

2017-07-17 Thread Frediano Ziglio
> > On Fri, Jul 14, 2017 at 05:48:45AM -0400, Frediano Ziglio wrote: > > > > > > If one does not have gdb installed it's nicer > > > to simply get the error message (and some > > > debug messages). > > > > > > > I don't really agree. The imagetest is supposed to be a test > > utility so is

Re: [Spice-devel] [spice-gtk] build-sys: Lower gettext requirement

2017-07-17 Thread Christophe Fergeau
On Mon, Jul 17, 2017 at 02:24:40PM +0200, Pavel Grunt wrote: > On Mon, 2017-07-17 at 14:00 +0200, Christophe Fergeau wrote: > > spice-gtk currently requires gettext 0.19 which is a fairly recent > > release (not available in el7.3 and older, nor in ubuntu 14.04 LTS). > > They both have a gettext

Re: [Spice-devel] [PATCH spice-gtk] Do not update .po files with ./autogen.sh && make

2017-07-17 Thread Marc-André Lureau
- Original Message - > It is enough to update them just before the release (`make dist`) > > Reported-by: Victor Toso ack > --- > also remove a intltool leftover > --- > Makefile.am | 1 - > po/Makevars | 2 +- > 2 files changed, 1 insertion(+), 2 deletions(-)

Re: [Spice-devel] [spice-gtk] build-sys: Lower gettext requirement

2017-07-17 Thread Pavel Grunt
On Mon, 2017-07-17 at 14:00 +0200, Christophe Fergeau wrote: > spice-gtk currently requires gettext 0.19 which is a fairly recent > release (not available in el7.3 and older, nor in ubuntu 14.04 LTS). > They both have a gettext newer than 0.18.2, so we can require that. > > Requiring 0.18 or

Re: [Spice-devel] [spice-gtk] build-sys: Lower gettext requirement

2017-07-17 Thread Christophe Fergeau
On Mon, Jul 17, 2017 at 03:20:02PM +0200, Christophe Fergeau wrote: > On Mon, Jul 17, 2017 at 02:24:40PM +0200, Pavel Grunt wrote: > > On Mon, 2017-07-17 at 14:00 +0200, Christophe Fergeau wrote: > > > spice-gtk currently requires gettext 0.19 which is a fairly recent > > > release (not available

Re: [Spice-devel] [PATCH spice-gtk v2] spice-gtk: Use time comparisons that still work after wraparound

2017-07-17 Thread Christophe Fergeau
On Mon, Jul 17, 2017 at 02:00:01PM +0200, Christophe de Dinechin wrote: > > > On 17 Jul 2017, at 13:49, Christophe Fergeau > > wrote: > > > > On Mon, Jul 17, 2017 at 11:44:04AM +0200, Christophe de Dinechin wrote: > >> From: Christophe de

Re: [Spice-devel] [PATCH spice-gtk 1/2] display: factor out initialization of stream array

2017-07-17 Thread Christophe Fergeau
On Mon, Jul 17, 2017 at 01:04:04PM +0200, Victor Toso wrote: > Hi, > > On Mon, Jul 17, 2017 at 12:52:41PM +0200, Christophe Fergeau wrote: > > On Fri, Jun 30, 2017 at 12:51:16PM +0200, Victor Toso wrote: > > > From: Victor Toso > > > > > > Including some comment about

Re: [Spice-devel] [vdagent-win PATCH 4/4] imagetest: replace assert with printf

2017-07-17 Thread Christophe Fergeau
On Fri, Jul 14, 2017 at 05:48:45AM -0400, Frediano Ziglio wrote: > > > > If one does not have gdb installed it's nicer > > to simply get the error message (and some > > debug messages). > > > > I don't really agree. The imagetest is supposed to be a test > utility so is used only during

Re: [Spice-devel] [spice-server PATCH 1/3] red_get_surface_cmd: avoid overflow

2017-07-17 Thread Frediano Ziglio
> > Although unlikely, theoretically, multiplying two 32-bit > numbers may overflow. > > Found by coverity. > > Signed-off-by: Uri Lublin > --- > server/red-parse-qxl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/server/red-parse-qxl.c

[Spice-devel] [vdagent-win PATCH v6 2/5] Initial rewrite of image conversion code

2017-07-17 Thread Frediano Ziglio
Remove CxImage linking. Support Windows BMP format. Signed-off-by: Frediano Ziglio --- Makefile.am | 4 +- configure.ac| 4 +- mingw-spice-vdagent.spec.in | 10 +-- vdagent/image.cpp | 170

Re: [Spice-devel] [spice-server PATCH 1/3] red_get_surface_cmd: avoid overflow

2017-07-17 Thread Pavel Grunt
On Sun, 2017-07-16 at 18:47 +0300, Uri Lublin wrote: > Although unlikely, theoretically, multiplying two 32-bit > numbers may overflow. > > Found by coverity. > > Signed-off-by: Uri Lublin Acked-by: Pavel Grunt > --- > server/red-parse-qxl.c | 2 +- > 1

Re: [Spice-devel] [spice-server PATCH 3/3] init ssl connection: return quickly if link is null

2017-07-17 Thread Frediano Ziglio
> > On Sun, 2017-07-16 at 18:47 +0300, Uri Lublin wrote: > > Under error: 'link' fields are being accessed, so it's > > wrong to goto error with link == NULL. > > > > Instead, return immediately. > > > > Found by coverity. > > > > Signed-off-by: Uri Lublin > Acked-by: Pavel

Re: [Spice-devel] [PATCH spice-gtk] spice-gtk: Use time comparisons that still work after wraparound

2017-07-17 Thread Christophe de Dinechin
> On 17 Jul 2017, at 10:33, Christophe Fergeau wrote: > > On Thu, Jul 13, 2017 at 04:21:36PM +0200, Christophe de Dinechin wrote: >> From: Christophe de Dinechin >> >> The mm timer is a millisecond timer that wraps around after ~49 days. >> All

[Spice-devel] [vdagent-win PATCH v5 2/5] Initial rewrite of image conversion code

2017-07-17 Thread Frediano Ziglio
Remove CxImage linking. Support Windows BMP format. Signed-off-by: Frediano Ziglio --- Makefile.am | 4 +- configure.ac| 4 +- mingw-spice-vdagent.spec.in | 6 +- vdagent/image.cpp | 170

Re: [Spice-devel] [PATCH spice-gtk] spice-gtk: Use time comparisons that still work after wraparound

2017-07-17 Thread Christophe Fergeau
On Thu, Jul 13, 2017 at 04:21:36PM +0200, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > The mm timer is a millisecond timer that wraps around after ~49 days. > All comparisons that look like a Instead, use signed ((int)(a-b)<0), which may fail if there is

[Spice-devel] [vdagent-win PATCH v4 5/5] Add test for PNG files

2017-07-17 Thread Frediano Ziglio
Test various image and formats. The idea is to decode and encode again an image and check for differences. ImageMagick is used to create some test image and compare results. Wine is used to execute a test helper. Signed-off-by: Frediano Ziglio --- Makefile.am | 20

[Spice-devel] [vdagent-win PATCH v4 2/5] Initial rewrite of image conversion code

2017-07-17 Thread Frediano Ziglio
Remove CxImage linking. Support Windows BMP format. Signed-off-by: Frediano Ziglio --- Makefile.am | 4 +- configure.ac| 4 +- mingw-spice-vdagent.spec.in | 2 - vdagent/image.cpp | 170

[Spice-devel] [vdagent-win PATCH v4 3/5] Write code to decode PNG format

2017-07-17 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- Makefile.am | 6 +- configure.ac | 3 + vdagent/image.cpp| 8 +- vdagent/imagepng.cpp | 244 +++ vdagent/imagepng.h | 25 ++ 5 files changed, 277

[Spice-devel] [vdagent-win PATCH v4 0/5] Rewrite image support

2017-07-17 Thread Frediano Ziglio
CxImage is used for image conversion for clipboard support. CxImage have currently some issue: - library is old and unsupported; - required an old libpng library. Currently the MingW binary we distribute due to some issue have PNG disabled (so no clipboard image support). Note that currently we

[Spice-devel] [vdagent-win PATCH v4 1/5] Move image handling to a separate file

2017-07-17 Thread Frediano Ziglio
This will make easier to change code that handle images. Signed-off-by: Frediano Ziglio --- Makefile.am | 2 ++ vdagent/image.cpp | 88 + vdagent/image.h | 48 +

[Spice-devel] [vdagent-win PATCH v4 4/5] Support encoding PNG images

2017-07-17 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- vdagent/imagepng.cpp | 138 --- 1 file changed, 131 insertions(+), 7 deletions(-) diff --git a/vdagent/imagepng.cpp b/vdagent/imagepng.cpp index 19d9efc..c5fc6c0 100644 ---

Re: [Spice-devel] [vdagent-win PATCH v4 5/5] Add test for PNG files

2017-07-17 Thread Frediano Ziglio
> > Test various image and formats. > The idea is to decode and encode again an image and > check for differences. ImageMagick is used to create > some test image and compare results. > Wine is used to execute a test helper. > > Signed-off-by: Frediano Ziglio A bit OT. I

Re: [Spice-devel] [vdagent-win PATCH v4 5/5] Add test for PNG files

2017-07-17 Thread Christophe Fergeau
On Mon, Jul 17, 2017 at 05:21:29AM -0400, Frediano Ziglio wrote: > > > > Test various image and formats. > > The idea is to decode and encode again an image and > > check for differences. ImageMagick is used to create > > some test image and compare results. > > Wine is used to execute a test

[Spice-devel] [PATCH spice-gtk v2] spice-gtk: Use time comparisons that still work after wraparound

2017-07-17 Thread Christophe de Dinechin
From: Christophe de Dinechin The mm timer is a millisecond timer that wraps around after ~49 days. All comparisons that look like a --- src/channel-display-gst.c | 4 ++-- src/channel-display-mjpeg.c | 4 ++-- src/channel-display.c | 2 +- src/channel-playback.c

Re: [Spice-devel] [vdagent-win PATCH 0/7] Rewrite image support and other patches

2017-07-17 Thread Frediano Ziglio
> > On 07/14/2017 01:14 PM, Frediano Ziglio wrote: > >> > >> On 07/06/2017 04:31 PM, Frediano Ziglio wrote: > >>> CxImage is used for image conversion for clipboard support. > >>> CxImage have currently some issue: > >>> - library is old and unsupported; > >>> - required an old libpng library. >

Re: [Spice-devel] [PATCH linux vdagent] Add systemd socket activation

2017-07-17 Thread Christophe Fergeau
On Thu, Jul 13, 2017 at 03:35:03PM -0500, Jonathon Jongsma wrote: > If we are configured to use the systemd init script, also add support > for systemd socket activation. systemd will listen on the socket that is > used to communicate between the session agent and the system daemon. > When the

Re: [Spice-devel] [vdagent-win PATCH v3 2/5] Initial rewrite of image conversion code

2017-07-17 Thread Pavel Grunt
On Fri, 2017-07-14 at 11:42 -0400, Frediano Ziglio wrote: > > > > On Fri, 2017-07-14 at 13:57 +0100, Frediano Ziglio wrote: > > > Remove CxImage linking. > > > Support Windows BMP format. > > > > > > Signed-off-by: Frediano Ziglio > > > --- > > > Makefile.am

Re: [Spice-devel] [spice-server PATCH 3/3] init ssl connection: return quickly if link is null

2017-07-17 Thread Pavel Grunt
On Sun, 2017-07-16 at 18:47 +0300, Uri Lublin wrote: > Under error: 'link' fields are being accessed, so it's > wrong to goto error with link == NULL. > > Instead, return immediately. > > Found by coverity. > > Signed-off-by: Uri Lublin Acked-by: Pavel Grunt

Re: [Spice-devel] [spice-server PATCH 2/3] red_replay_image_free: do not free QUIC qxl twice

2017-07-17 Thread Pavel Grunt
On Sun, 2017-07-16 at 18:47 +0300, Uri Lublin wrote: > If qxl->descriptor.type is QUIC, red_replay_data_chunks_free > frees qxl (data), so no need to free it again at the bottom > of the function. > > Found by coverity. > > Signed-off-by: Uri Lublin Acked-by: Pavel Grunt