[Spice-devel] [spice-server v4 05/11] qxl: Release QXL resource in red_put_message

2018-11-29 Thread Christophe Fergeau
--- server/red-parse-qxl.c | 7 +-- server/red-parse-qxl.h | 3 ++- server/red-worker.c| 3 +-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index 7e6f5ce9d..4be53d3e5 100644 --- a/server/red-parse-qxl.c +++

[Spice-devel] [spice-server v4 01/11] qxl: Move red_drawable_unref/red_drawable_new

2018-11-29 Thread Christophe Fergeau
RedDrawable really is a RedDrawCmd which is parsed by red-parse-qxl.h Moreover, red_drawable_ref() is already defined inline in red-parse-qxl.h, and red_drawable_unref() is declared there too even if its code is still in red-worker.c This commit moves them close to the other functions

[Spice-devel] [spice-server v4 06/11] qxl: Add red_message_{new, ref, unref} helpers

2018-11-29 Thread Christophe Fergeau
Currently, RedMessage are allocated on the stack, and then initialized/uninitialized with red_{get,put}_message This makes the API inconsistent with what is being done for RedDrawable and RedCursor. Since QXLMessage is just a (mostly unused/unsecure) debugging tool, we can dynamically allocate it

[Spice-devel] [spice-server v4 08/11] qxl: Add red_update_cmd_{new, ref, unref} helpers

2018-11-29 Thread Christophe Fergeau
Currently, RedUpdateCmd are allocated on the stack, and then initialized/uninitialized with red_{get,put}_update_cmd This makes the API inconsistent with what is being done for RedDrawable, RedCursor and RedMessage. QXLUpdateCmd are not occurring very often, we can dynamically allocate them

[Spice-devel] [spice-server v4 04/11] qxl: Add red_cursor_cmd_{new, ref, unref} helpers

2018-11-29 Thread Christophe Fergeau
Currently, the cursor channel is allocating RedCursorCmd instances itself, and then calling into red-parse-qxl.h to initialize it, and doing something similar when releasing the data. This commit moves this common code to red-parse-qxl.[ch] The ref/unref are not strictly needed,

[Spice-devel] qxl: Move more guest resource release to red-parse-qxl

2018-11-29 Thread Christophe Fergeau
Hey, Currently, after parsing a QXL command through red-parse-qxl, the code which got the command has to tell red-parse-qxl when it no longer needs the command, but also to remember to release the command QXL resources itself. This series moves this 'release resource' logic to red-parse-qxl. This

[Spice-devel] [spice-server v4 11/11] qxl: Release QXL resources in red_put_surface_cmd

2018-11-29 Thread Christophe Fergeau
--- server/display-channel.c | 3 --- server/red-parse-qxl.c | 12 server/red-parse-qxl.h | 1 + 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/server/display-channel.c b/server/display-channel.c index 91ef72215..e68ed10f8 100644 --- a/server/display-channel.c

[Spice-devel] [spice-server v4 10/11] display-channel: Store full RedSurfaceCmd, not just QXLReleaseInfoExt

2018-11-29 Thread Christophe Fergeau
Now that we have a refcounted RedSurfaceCmd, we can store the command itself in DisplayChannel rather than copying QXLReleaseInfoExt. This will let us move the release of the QXL guest resources in red-parse-qxl in the next commit. --- server/display-channel-private.h | 7 ++-

[Spice-devel] [spice-server v4 09/11] qxl: Add red_surface_cmd_{new, ref, unref} helpers

2018-11-29 Thread Christophe Fergeau
Currently, RedWorker is using stack-allocated variables for RedSurfaceCmd. Surface commands are rare enough that we can dynamically allocate them instead, and make the API in red-parse-qxl.h consistent with how other QXL commands are handled. --- server/red-parse-qxl.c | 38

[Spice-devel] [spice-server v4 02/11] qxl: Make red_{get, put}_drawable static

2018-11-29 Thread Christophe Fergeau
Rather than needing to call red_drawable_new() and then initialize it with red_get_drawable(), we can improve slightly red_drawable new so that red_drawable_{new,ref,unref} is all which is used by code out of red-parse-qxl.c. --- server/red-parse-qxl.c | 17 -

Re: [Spice-devel] [PATCH spice-common] Integrate recorder library

2018-11-28 Thread Christophe Fergeau
On Wed, Nov 28, 2018 at 11:23:17AM +0100, Christophe de Dinechin wrote: > > On 27 Nov 2018, at 15:38, Christophe Fergeau wrote: > > I'm not really asking how to use it, but it's very odd to have a patch > > adding a new dep without seeing any accompanying patches which need t

Re: [Spice-devel] [PATCH spice-common] Integrate recorder library

2018-11-27 Thread Christophe Fergeau
On Thu, Nov 22, 2018 at 05:58:01AM -0500, Frediano Ziglio wrote: > > > > Hey, > > > > On Mon, Nov 19, 2018 at 08:46:04PM +, Frediano Ziglio wrote: > > > From: Christophe de Dinechin > > > > > > Allow to use recorder library. See https://github.com/c3d/recorder for > > > details. > > > The

Re: [Spice-devel] [PATCH] spice: Use new SpiceImageCompression definition

2018-11-27 Thread Christophe Fergeau
hey, On Mon, Nov 26, 2018 at 03:30:36PM +, Frediano Ziglio wrote: > Definitions were updated by spice-server in patch de66161 included > in 0.12.6 released on 12th June 2015. QEMU's configure only checks for spice-server 0.12.0: $pkg_config --atleast-version=0.12.0 spice-server if

Re: [Spice-devel] [PATCH spice-gtk] spice-widget: Make sure we can use X11 from different thread

2018-11-27 Thread Christophe Fergeau
On Mon, Nov 26, 2018 at 09:37:31AM -0500, Frediano Ziglio wrote: > One good thing of doing from spice-gtk is that every program linking > spice-gtk not with dlopen (so virt-viewer, virt-manager and spicy for > instance) > will be "fixed". virt-manager is python + gobject-introspection, and only

Re: [Spice-devel] [spice-gtk v2 1/1] usb-redirection: implementation of usb backend layer

2018-11-26 Thread Christophe Fergeau
On Sun, Sep 30, 2018 at 06:13:04PM +0300, Yuri Benditovich wrote: > This layer communicates with libusb and libusbredir and > provides the API for USB redirection procedures. > All the modules of spice-gtk communicate only with usb > backend instead of calling libusb and usbredirhost directly. >

Re: [Spice-devel] [PATCH spice-gtk] spice-widget: Make sure we can use X11 from different thread

2018-11-26 Thread Christophe Fergeau
On Mon, Nov 26, 2018 at 06:27:48AM -0500, Frediano Ziglio wrote: > > > > Hi, > > > > On 11/26/18 10:16 AM, Frediano Ziglio wrote: > > > In order to support GStreamer overlay this is necessary as some > > > plugins can use X11 from a different thread. > > > > > > Signed-off-by: Frediano Ziglio >

Re: [Spice-devel] [PATCH spice-server] dcc: Add debug log when setting compression

2018-11-26 Thread Christophe Fergeau
Yup, same patch as the one I had locally (without the submodule update), thanks, looks good to me. Christophe On Mon, Nov 26, 2018 at 01:01:07PM +, Frediano Ziglio wrote: > From: Christophe Fergeau > > Without this it's not obvious that a compression setting took effect. > -

[Spice-devel] [spice-common v2] utils: Add genum -> string helpers

2018-11-23 Thread Christophe Fergeau
This makes it easier to convert enums registered with glib type system to string in order to print them at runtime. Signed-off-by: Christophe Fergeau --- common/Makefile.am | 2 ++ common/meson.build | 2 ++ common/utils.c | 68 ++ common

Re: [Spice-devel] [spice-common] utils: Add genum -> string helpers

2018-11-23 Thread Christophe Fergeau
On Thu, Nov 22, 2018 at 04:08:45PM -0500, Frediano Ziglio wrote: > > > > This makes it easier to convert enums registered with glib type system > > to string in order to print them at runtime. > > > > Signed-off-by: Christophe Fergeau > > --- > &g

[Spice-devel] [spice-common] utils: Add genum -> string helpers

2018-11-22 Thread Christophe Fergeau
This makes it easier to convert enums registered with glib type system to string in order to print them at runtime. Signed-off-by: Christophe Fergeau --- common/Makefile.am | 2 ++ common/meson.build | 2 ++ common/utils.c | 64 ++ common

Re: [Spice-devel] [spice-server 3/3] dcc: Add debug log when setting compression

2018-11-22 Thread Christophe Fergeau
On Thu, Oct 18, 2018 at 10:17:45AM -0400, Frediano Ziglio wrote: > > + > > +/* These 2 functions come from > > + * libvirt-glib/libvirt-gconfig/libvirt-gconfig-helpers.c > > + * Copyright (C) 2010, 2011 Red Hat, Inc. > > + * LGPLv2.1+ licensed */ > > the license is the same, no reason to state

Re: [Spice-devel] [PATCH spice-gtk] spice-channel: Add some comment to spice_channel_read

2018-11-22 Thread Christophe Fergeau
eturns 0 if connection was closed or unknown errors, <0 for error and "or on unknown errors" I think. Acked-by: Christophe Fergeau Christophe > + * length on success > */ > /* coroutine context */ > static int spice_chan

Re: [Spice-devel] [PATCH spice-gtk] spice-channel: Avoids spice_channel_read_wire returning success

2018-11-22 Thread Christophe Fergeau
= TRUE; > -return -errno; > +return errno > 0 ? -errno : -EIO; This could almost be g_return_val_if_fail(errno > 0, -EIO); return -errno; Acked-by: Christophe Fergeau with the log improved. Christophe signature.asc Description: PGP signature ___

Re: [Spice-devel] [PATCH spice-common] Integrate recorder library

2018-11-21 Thread Christophe Fergeau
Hey, On Mon, Nov 19, 2018 at 08:46:04PM +, Frediano Ziglio wrote: > From: Christophe de Dinechin > > Allow to use recorder library. See https://github.com/c3d/recorder for > details. > The main usage will be to collect statistics while the programs will run. > By default the recorder will

Re: [Spice-devel] [PATCH spice-gtk] spice-channel: Adjust endianness in a single place for link message

2018-11-21 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Tue, Nov 20, 2018 at 05:36:15PM +, Frediano Ziglio wrote: > Make sure all fields have right endian. "error" field was not adjusted. > > Signed-off-by: Frediano Ziglio > --- > src/spice-channel.c | 12 +--- > 1 file

Re: [Spice-devel] [PATCH] drm/qxl: add spice-devel list to MAINTAINERS

2018-11-21 Thread Christophe Fergeau
On Wed, Nov 21, 2018 at 10:01:29AM +0100, Gerd Hoffmann wrote: > So qxl kernel patches are sent to the spice-devel list for review. > > Signed-off-by: Gerd Hoffmann > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index

Re: [Spice-devel] [spice-gtk] build: Remove need for static linking for tests

2018-11-21 Thread Christophe Fergeau
link the tests with. This is better than --enable-static as we don't need to rebuild each object twice (static and shared). » > > > This was inspired by similar work Fabiano Fidencio did in libosinfo: > > https://www.redhat.com/archives/libosinfo/2018-November/msg00231.ht

[Spice-devel] [spice-gtk] build: Remove need for static linking for tests

2018-11-21 Thread Christophe Fergeau
. The installed spice-client-glib-2.0.la library is just this library with the version script applied to hide non exported symbols. This was inspired by similar work Fabiano Fidencio did in libosinfo: https://www.redhat.com/archives/libosinfo/2018-November/msg00231.html Signed-off-by: Christophe Fergeau

Re: [Spice-devel] [PATCH spice-gtk 1/2] spice-channel: Remove useless peer_pos

2018-11-20 Thread Christophe Fergeau
On Tue, Nov 20, 2018 at 01:25:44PM +, Frediano Ziglio wrote: > With coroutine the spice_channel_recv_link_msg function reads the > entire message, no reason to store partial position. This reverts 9a36e853d which predates coroutines indeed. Acked-by: Christophe Fergeau > >

Re: [Spice-devel] [PATCH spice-gtk 2/2] spice-channel: Use unsigned for num_caps

2018-11-20 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Tue, Nov 20, 2018 at 01:25:45PM +, Frediano Ziglio wrote: > Is just a sum of 2 unsigned numbers > > Signed-off-by: Frediano Ziglio > --- > src/spice-channel.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >

Re: [Spice-devel] [PATCH] Support for toggling Menubar visibility on spicy

2018-11-20 Thread Christophe Fergeau
Hey, spicy really is a test tool for the spice-gtk widget. As such, we usually don't add such UI polishing patches to it as we don't want to encourage its use outside of spice development. If you need something similar based on spice-gtk, I'd recommend looking at virt-viewer/remote-viewer.

Re: [Spice-devel] [PATCH spice-common v2 1/3] Create common header for demarshallers declarations

2018-10-15 Thread Christophe Fergeau
I'd prefer that we explicitly name these "other headers" rather than letting the reader go down on a hunt for them. Apart from this, series looks good to me, Acked-by: Christophe Fergeau Christophe > declarations do not match. > Using a common header shared between g

Re: [Spice-devel] Disable file drag & drop in vdagent?

2018-10-15 Thread Christophe Fergeau
Hey, On Mon, Oct 15, 2018 at 07:30:32AM +, MK wrote: > Hi Christophe! > > Thanks for your fast answer. The mentioned option does work with windows > version of the remote-viewer 6 and 7, but not with my old remote-viewer 3.1. > This version blocks clipboard functionality as well (bug?). >

Re: [Spice-devel] [PATCH spice-common] Create common header for demarshallers declarations

2018-10-15 Thread Christophe Fergeau
pice_get_server_channel_parser and > spice_get_client_channel_parser) inside demarshallers.h ? Probably, in which case this commit would mostly become a git mv? Acked-by: Christophe Fergeau Christophe signature.asc Description: PGP signature ___ Spice-dev

Re: [Spice-devel] [PATCH spice-common v2 0/4] Remove obsoleted attributes from code generator

2018-10-15 Thread Christophe Fergeau
Looks good to me, and the parser errors out if these attributes are in use in some proto file, so this won't go unnoticed. For the series: Acked-by: Christophe Fergeau On Fri, Oct 12, 2018 at 12:48:03PM +0100, Frediano Ziglio wrote: > Changes since v1: > - improved commit message on &q

Re: [Spice-devel] spice-gtk.spec

2018-10-15 Thread Christophe Fergeau
On Mon, Oct 15, 2018 at 12:11:35PM +0300, Snir Sheriber wrote: > Hi, > > > On 10/15/2018 10:26 AM, zhenc...@easted.com.cn wrote: > > Dear: > >   I am a spice newbies. So i need some help. > >   How can i get spice-gtk.spec for spice-gtk-0.35. > Welcome :) > > One place you can find it is in the

Re: [Spice-devel] usbredir error: Error setting USB device node ACL: 'Not authorized'

2018-10-10 Thread Christophe Fergeau
Hey, On Wed, Oct 10, 2018 at 09:57:39AM -0400, Cole Robinson wrote: > On 10/09/2018 04:42 PM, Lars Kellogg-Stedman wrote: > > I'm running libvirt under Fedora 28. I would like to attach a USB > > device to a VM, but when I select "Redirect USB Device" from the > > "Virtual Machine" menu in

Re: [Spice-devel] Disable file drag & drop in vdagent?

2018-10-10 Thread Christophe Fergeau
Hello, On Tue, Oct 09, 2018 at 02:13:59PM +, MK wrote: > Hi devels! > > I'd like to disable drag and drop of files from Windows to a Linux guest. But > I like to keep the clipboard sharing functionality. > > Is there any option to set this - as I have not found one. You can disable it

Re: [Spice-devel] [PATCH spice-server 1/2] utils: Get monotonic time in a coherent way

2018-10-09 Thread Christophe Fergeau
; > > > > #define NSEC_PER_SEC 10LL > > > #define NSEC_PER_MILLISEC 100LL > > > +#define NSEC_PER_MICROSEC 1000 > > > > > > -/* FIXME: consider g_get_monotonic_time (), but in microseconds */ > > > +/* g_get_monotonic_t

Re: [Spice-devel] [PATCH spice-server 1/2] utils: Get monotonic time in a coherent way

2018-10-09 Thread Christophe Fergeau
On Tue, Oct 09, 2018 at 01:14:10PM +0100, Frediano Ziglio wrote: > Use a single function to get monotonic time. > As lot of code needs nanosecond precision, spice_get_monotonic_time_ns > is used. > "lots of code needs nanosecond precision"? I looked at a few files using

Re: [Spice-devel] [PATCH spice-server 4/5] reds: Use monotonic time for ticket expiration

2018-10-09 Thread Christophe Fergeau
On Tue, Oct 09, 2018 at 07:48:00AM -0400, Frediano Ziglio wrote: > > On Tue, Oct 09, 2018 at 09:30:05AM +0100, Frediano Ziglio wrote: > > > Avoid time adjustment issues. > > > For instance ticket validity can change when daylight time changes. > > > > > > Signed-off-by: Frediano Ziglio > > > ---

Re: [Spice-devel] [PATCH spice-server 1/5] reds: Use mnemonic to make code more readable

2018-10-09 Thread Christophe Fergeau
t; +return g_get_monotonic_time() / MSEC_PER_SEC; > > } > > > > void reds_enable_mm_time(RedsState *reds) > > Just realized should be USEC_PER_MSEC here, never mind, still morning Acked-by: Christophe Fergeau > > Frediano >

Re: [Spice-devel] [PATCH spice-server 5/5] display-channel: Remove useless parenthesis

2018-10-09 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Tue, Oct 09, 2018 at 09:30:06AM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > server/display-channel.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/server/display-channel.c b/server/display

Re: [Spice-devel] [PATCH spice-server 2/5] red-stream: Propagate RedStreamSslStatus type

2018-10-09 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Tue, Oct 09, 2018 at 09:30:03AM +0100, Frediano Ziglio wrote: > Do not convert RedStreamSslStatus enumeration type back to int. > This allows compilers to perform some more type safe checks. > > Signed-off-by: Frediano Ziglio > --- > serve

Re: [Spice-devel] [PATCH spice-server 3/5] reds: Assume error if RedStreamSslStatus is not recognized

2018-10-09 Thread Christophe Fergeau
On Tue, Oct 09, 2018 at 09:30:04AM +0100, Frediano Ziglio wrote: > Make code safer in case the enumeration is extended in the future. Without default:, the compiler should give you a compile-time warning that you don't handle all cases. With default:, the warning is going to be silenced, and we

Re: [Spice-devel] [PATCH spice-server 4/5] reds: Use monotonic time for ticket expiration

2018-10-09 Thread Christophe Fergeau
On Tue, Oct 09, 2018 at 09:30:05AM +0100, Frediano Ziglio wrote: > Avoid time adjustment issues. > For instance ticket validity can change when daylight time changes. > > Signed-off-by: Frediano Ziglio > --- > server/reds.c | 5 ++--- > server/utils.h | 8 > 2 files changed, 10

Re: [Spice-devel] About Building Spice OSX Client

2018-10-05 Thread Christophe Fergeau
Hey, On Thu, Sep 27, 2018 at 03:03:50AM +, dengron...@ruijie.com.cn wrote: > Hello,spice developer > I’m a developer from China,I want to build SPICE on Mac,and I > followed the instructions on your official page: > https://www.spice-space.org/osx-client.html. > I just cant walk

Re: [Spice-devel] [spice-gtk v2 0/1] usb redirection: USB backend layer

2018-10-05 Thread Christophe Fergeau
On Thu, Oct 04, 2018 at 07:09:12PM +0300, Yuri Benditovich wrote: > Ping Yes, sorry, busy week, did not have time to get back to it yet. Christophe > > On Sun, Sep 30, 2018 at 6:13 PM Yuri Benditovich < > yuri.benditov...@daynix.com> wrote: > > > USB backend communicates with libusb and

Re: [Spice-devel] Virt-viewer single connection

2018-10-05 Thread Christophe Fergeau
On Thu, Oct 04, 2018 at 09:57:51AM -0500, Jonathon Jongsma wrote: > Another possibility might be to have the windows vdagent lock the > windows account when a client disconnects. This wouldn't prevent > another user from "stealing" the spice session, but it might prevent > them from accessing to

Re: [Spice-devel] [spice-server 3/3] dcc: Add debug log when setting compression

2018-10-05 Thread Christophe Fergeau
On Thu, Oct 04, 2018 at 01:46:21PM -0400, Frediano Ziglio wrote: > > diff --git a/server/utils.h b/server/utils.h > > index 5cb0eb0ee..52b7f5b3e 100644 > > --- a/server/utils.h > > +++ b/server/utils.h > > @@ -21,6 +21,7 @@ > > > > #include > > #include > > +#include > > > > #define

Re: [Spice-devel] [spice-server 1/3] utils: Remove get/set/clear_bit

2018-10-05 Thread Christophe Fergeau
On Thu, Oct 04, 2018 at 01:42:23PM -0400, Frediano Ziglio wrote: > > -static inline void set_bit(int index, uint32_t *addr) > > -{ > > -uint32_t mask = 1 << index; > > -__sync_or_and_fetch(addr, mask); > > -} > > - > > -static inline void clear_bit(int index, uint32_t *addr) > > -{ > > -

[Spice-devel] [spice-common] Remove config.h from header files

2018-10-04 Thread Christophe Fergeau
This should only be included from c files. Signed-off-by: Christophe Fergeau --- common/client_marshallers.h | 4 common/mem.h| 4 common/messages.h | 4 3 files changed, 12 deletions(-) diff --git a/common/client_marshallers.h b/common

[Spice-devel] [spice-server 1/3] utils: Remove get/set/clear_bit

2018-10-04 Thread Christophe Fergeau
These function are used once each by red-qxl.c, they don't need to be exported in utils.h --- server/red-qxl.c | 17 + server/utils.h | 16 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/server/red-qxl.c b/server/red-qxl.c index

[Spice-devel] [spice-server 2/3] utils: Remove spice_get_monotonic_time_ms

2018-10-04 Thread Christophe Fergeau
This is a thin wrapper over g_get_monotonic_time_ms, and is called only once, so we can call directly g_get_monotonic_time_ms instead. --- server/reds.c | 2 +- server/utils.h | 5 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/server/reds.c b/server/reds.c index

[Spice-devel] [spice-server 3/3] dcc: Add debug log when setting compression

2018-10-04 Thread Christophe Fergeau
Without this it's not obvious that a compression setting took effect. --- server/dcc.c | 3 +++ server/utils.c | 42 ++ server/utils.h | 3 +++ 3 files changed, 48 insertions(+) diff --git a/server/dcc.c b/server/dcc.c index 826dd28fe..e27d3dcad 100644

Re: [Spice-devel] [spice-gtk] display-gst: debug instead of warning on lack of video codecs

2018-10-04 Thread Christophe Fergeau
On Tue, Oct 02, 2018 at 10:19:01AM +0200, Victor Toso wrote: > Hi, > > On Mon, Oct 01, 2018 at 06:03:07PM +0200, Christophe Fergeau wrote: > > On Mon, Oct 01, 2018 at 05:43:26PM +0200, Victor Toso wrote: > > > From: Victor Toso > > > > > > Just plain

[Spice-devel] [spice-gtk v3 2/2] mingw: Fix compilation breakage because of memmem use

2018-10-04 Thread Christophe Fergeau
mingw does not provide memmem. Since the qmp data is JSON, it won't contain embedded nul characters, we can use strstr instead of memmem. Signed-off-by: Christophe Fergeau --- - add explicit check for NULL to match coding style src/qmp-port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[Spice-devel] [spice-gtk v3 1/2] mingw: Use G_GUINT64_FORMAT with glib printing functions

2018-10-04 Thread Christophe Fergeau
this comment in glib bugzilla for a lot of details https://bugzilla.gnome.org/show_bug.cgi?id=795569#c7 This commit switches to using the format specifiers provided by glib instead which won't have the same issue as PRIx64 Signed-off-by: Christophe Fergeau --- Changes since v2: - split >100 ch

Re: [Spice-devel] [spice-gtk] usb-device-widget: use g_clear_pointer

2018-10-01 Thread Christophe Fergeau
Looks good, but I don't know how much this interferes with the changes Yuri is doing to that code? Should only cause minor commits though. Acked-by: Christophe Fergeau On Mon, Oct 01, 2018 at 05:49:42PM +0200, Victor Toso wrote: > From: Victor Toso > > --- > src/usb-device-

Re: [Spice-devel] [spice-gtk] display-gst: debug instead of warning on lack of video codecs

2018-10-01 Thread Christophe Fergeau
On Mon, Oct 01, 2018 at 05:43:26PM +0200, Victor Toso wrote: > From: Victor Toso > > Just plain ugly to have all Spice clients to warn out several times > due lack of gstreamer plugins for a given video-codec even though most > users don't really use streaming at all. Will there be a warning if

[Spice-devel] [spice-gtk v2 2/2] mingw: Fix compilation breakage because of memmem use

2018-10-01 Thread Christophe Fergeau
mingw does not provide memmem. Since the qmp data is JSON, it won't contain embedded nul characters, we can use g_strstr_len instead of memmem. Signed-off-by: Christophe Fergeau --- Changes since v1: - rework commit log - use strstr instead of g_strstr_len src/qmp-port.c | 2 +- 1 file

[Spice-devel] [spice-gtk v2 1/2] mingw: Use G_GUINT64_FORMAT with glib printing functions

2018-10-01 Thread Christophe Fergeau
this comment in glib bugzilla for a lot of details https://bugzilla.gnome.org/show_bug.cgi?id=795569#c7 This commit switches to using the format specifiers provided by glib instead which won't have the same issue as PRIx64 Signed-off-by: Christophe Fergeau --- Changes since v1: - use correct format

Re: [Spice-devel] [spice-gtk 1/2] mingw: Use G_GUINT64_FORMAT with glib printing functions

2018-10-01 Thread Christophe Fergeau
signed int'} [-Wformat=] > > > > See this glib commit for a related issue > > https://gitlab.gnome.org/GNOME/glib/commit/3d7cde654c4c6f3bdad32f5521f28f5802a7c377 > > > > This commit switches to using the format specifiers provided by glib > > instead which w

[Spice-devel] [spice-gtk 1/2] mingw: Use G_GUINT64_FORMAT with glib printing functions

2018-10-01 Thread Christophe Fergeau
This commit switches to using the format specifiers provided by glib instead which won't have the same issue as PRIx64 Signed-off-by: Christophe Fergeau --- src/channel-base.c| 8 src/channel-cursor.c | 2 +- src/channel-display-gst.c | 2 +- src/decode-glz.c | 8

[Spice-devel] [spice-gtk 2/2] mingw: Fix compilation breakage because of memmem use

2018-10-01 Thread Christophe Fergeau
;f=modules/memmem;h=63bd3efce10abff6ab4421650eb9df1c6bdfb2c7;hb=HEAD Signed-off-by: Christophe Fergeau --- src/qmp-port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qmp-port.c b/src/qmp-port.c index c91f967a..90527135 100644 --- a/src/qmp-port.c +++ b/src/qmp-port.c

Re: [Spice-devel] [RFC] server: Add make-it-quick Makefile and support files

2018-10-01 Thread Christophe Fergeau
On Fri, Sep 28, 2018 at 06:23:48PM +0200, Christophe de Dinechin wrote: > >>> On Fri, Sep 28, 2018 at 2:19 PM Christophe Fergeau > >>> wrote: > >>>> We just added meson support to spice/spice-gtk, I'd rather we don't add > >>>> a 3rd way to

Re: [Spice-devel] [spice-gtk v1 0/2] Add usb backend module

2018-09-28 Thread Christophe Fergeau
On Fri, Sep 28, 2018 at 02:24:21PM +0200, Christophe Fergeau wrote: > On Fri, Sep 28, 2018 at 02:49:07PM +0300, Yuri Benditovich wrote: > > Do you suggest different order of the changes in usb-redir than I've > > suggested? > > If yes, can you please share it with us? >

Re: [Spice-devel] [spice-gtk v1 0/2] Add usb backend module

2018-09-28 Thread Christophe Fergeau
On Fri, Sep 28, 2018 at 02:49:07PM +0300, Yuri Benditovich wrote: > On Fri, Sep 28, 2018 at 12:59 PM Christophe Fergeau > wrote: > > > On Thu, Sep 27, 2018 at 06:56:12PM +0300, Yuri Benditovich wrote: > > Hey, > > > > > Christophe, > > > > > >

Re: [Spice-devel] [RFC] server: Add make-it-quick Makefile and support files

2018-09-28 Thread Christophe Fergeau
Hey, We just added meson support to spice/spice-gtk, I'd rather we don't add a 3rd way to build spice, 2 is already error-prone enough :) Christophe On Thu, Sep 27, 2018 at 05:33:37PM +0200, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > Make-it-Quick is a make-only build

Re: [Spice-devel] [spice-gtk v1 0/2] Add usb backend module

2018-09-28 Thread Christophe Fergeau
On Thu, Sep 27, 2018 at 06:56:12PM +0300, Yuri Benditovich wrote: Hey, > Christophe, > > Our primary goal, if you remember, was to deliver cd-sharing feature. > For that it was needed to isolate usb redirection modules from libusb and > usbredir to create some abstraction layer for USB devices

Re: [Spice-devel] [spice-gtk v1 2/2] usb-redirection: use usb backend for usb redirection

2018-09-28 Thread Christophe Fergeau
On Fri, Sep 28, 2018 at 12:26:09PM +0300, Yuri Benditovich wrote: > > > diff --git a/src/meson.build b/src/meson.build > > > index 8c9199e..2870102 100644 > > > --- a/src/meson.build > > > +++ b/src/meson.build > > > @@ -78,6 +78,7 @@ spice_client_glib_introspection_sources = [ > > >

Re: [Spice-devel] [spice-gtk v1 2/2] usb-redirection: use usb backend for usb redirection

2018-09-28 Thread Christophe Fergeau
On Thu, Sep 27, 2018 at 07:31:23PM +0300, Yuri Benditovich wrote: > On Thu, Sep 27, 2018 at 12:12 PM Christophe Fergeau > wrote: > > > > This is an exported function, and if we start returning NULL in some > > > > cases, this is going to bre

Re: [Spice-devel] [spice-gtk v4 00/13] CD sharing feature

2018-09-27 Thread Christophe Fergeau
On Fri, Sep 21, 2018 at 08:10:08PM +0200, Christophe Fergeau wrote: > > All your SPICE_DEBUG calls include a __FUNCTION__, but it seems > SPICE_DEBUG already does that for you? > > #define SPICE_DEBUG(fmt, ...)

Re: [Spice-devel] [PATCH spice-gtk 4/5] meson: Add json-glib to the list of mandatory deps

2018-09-27 Thread Christophe Fergeau
On Thu, Sep 27, 2018 at 09:50:59AM -0300, Eduardo Lima (Etrunko) wrote: > On 9/26/18 5:26 AM, Frediano Ziglio wrote: > > OT: Mumble... this make me wonder... maybe we could integrate the > > Gitlab CI with a MingW (cross Windows) build? > > > > Definitely something worth trying. I still have not

Re: [Spice-devel] [spice-gtk v1 0/2] Add usb backend module

2018-09-27 Thread Christophe Fergeau
Hey, One additional high-level comment, after these patches, we have in the public API an opaque SpiceUsbDevice, which is // this is the structure behind SpiceUsbDevice typedef struct _SpiceUsbDeviceInfo { guint8 busnum; guint8 devaddr; guint16 vid; guint16 pid; gboolean

Re: [Spice-devel] [spice-gtk v1 2/2] usb-redirection: use usb backend for usb redirection

2018-09-27 Thread Christophe Fergeau
On Thu, Sep 27, 2018 at 11:48:13AM +0300, Yuri Benditovich wrote: > > > -static int usbredir_read_callback(void *user_data, uint8_t *data, int > > count) > > > +static void usbredir_log(void *user_data, const char *msg, gboolean > > error) > > > { > > > SpiceUsbredirChannel *channel =

Re: [Spice-devel] [PATCH spice-server 1/2] Bump meson requirement to 0.47.2

2018-09-26 Thread Christophe Fergeau
On Wed, Sep 26, 2018 at 10:50:26AM +0200, Victor Toso wrote: > Hi, > > On Wed, Sep 26, 2018 at 10:25:56AM +0200, Christophe Fergeau wrote: > > NB: The newer meson we require, the harder it will be to say "ok, from > > now on, we'll be switching to building with meson by

Re: [Spice-devel] [PATCH spice-server 2/2] meson: Add spice-protocol as subproject

2018-09-26 Thread Christophe Fergeau
On Wed, Sep 26, 2018 at 10:27:00AM +0200, Christophe Fergeau wrote: > On Tue, Sep 25, 2018 at 04:38:26PM -0400, Frediano Ziglio wrote: > > > > > > Fixes the cases where either the dependency is not installed or the > > > version installed does not satisfy the requir

Re: [Spice-devel] [PATCH spice-server 2/2] meson: Add spice-protocol as subproject

2018-09-26 Thread Christophe Fergeau
On Tue, Sep 25, 2018 at 04:38:26PM -0400, Frediano Ziglio wrote: > > > > Fixes the cases where either the dependency is not installed or the > > version installed does not satisfy the requirement. > > > > Signed-off-by: Eduardo Lima (Etrunko) > > Why this is not true for autoconf? > > As

Re: [Spice-devel] [PATCH spice-server 1/2] Bump meson requirement to 0.47.2

2018-09-26 Thread Christophe Fergeau
NB: The newer meson we require, the harder it will be to say "ok, from now on, we'll be switching to building with meson by default". Christophe On Tue, Sep 25, 2018 at 02:40:00PM -0300, Eduardo Lima (Etrunko) wrote: > This new version ships the fix for the issue where 'check' keyword could >

Re: [Spice-devel] [spice-gtk v1 2/2] usb-redirection: use usb backend for usb redirection

2018-09-25 Thread Christophe Fergeau
On Mon, Sep 24, 2018 at 11:43:55AM +0300, Yuri Benditovich wrote: > Replace all the communication with libusb and usbredirhost > by usb backend API. > > Signed-off-by: Yuri Benditovich > --- > src/Makefile.am | 2 + > src/channel-usbredir-priv.h | 9 +- >

Re: [Spice-devel] [spice-gtk v1 1/2] usb-redirection: introduce usb backend layer

2018-09-25 Thread Christophe Fergeau
Hey, Thanks for doing some splitting work! I would personally squash these 2 patches, as there is some code movement between the new file introduced in this patch, and the files which are modified in the other one. You seem to have left out some of the comments I made previously (the

Re: [Spice-devel] [spice-gtk v4 00/13] CD sharing feature

2018-09-25 Thread Christophe Fergeau
On Mon, Sep 24, 2018 at 06:56:59PM +0300, Yuri Benditovich wrote: > On Mon, Sep 24, 2018 at 4:32 PM Christophe Fergeau > wrote: > > > On Sat, Sep 22, 2018 at 12:21:04AM +0300, Yuri Benditovich wrote: > > > On Sat, Sep 22, 2018 at 12:14 AM, Yuri Benditovich < > &

Re: [Spice-devel] [spice-gtk v4 00/13] CD sharing feature

2018-09-24 Thread Christophe Fergeau
On Sat, Sep 22, 2018 at 12:21:04AM +0300, Yuri Benditovich wrote: > On Sat, Sep 22, 2018 at 12:14 AM, Yuri Benditovich < > yuri.benditov...@daynix.com> wrote: > > > Hi > > > > On Fri, Sep 21, 2018 at 9:10 PM, Christophe Fergeau > > wrote: > > > &

Re: [Spice-devel] [spice-gtk v4 00/13] CD sharing feature

2018-09-21 Thread Christophe Fergeau
:" G_STRINGIFY (__LINE__) ":" __PRETTY_FUNCTION__ "()" The "usbredirhost" stripping which is done in channel-usbredir.c:usbredir_log should be moved to the equivalent function in usb-backend-common.c Christophe From e1efc418ab5ee0412c7af938c3617ce3a0c19a69 Mon Sep 17 00:00:00

Re: [Spice-devel] [spice-gtk v4 12/13] cd-sharing: implementation of new USB widget

2018-09-20 Thread Christophe Fergeau
On Thu, Sep 20, 2018 at 04:09:56PM +0300, Yuri Benditovich wrote: > Use case: installing Windows 7/10 VM ( or Win 7 ) with virtio hard drive. > Need to share 2 ISOs (this is what users do, this allows install all the > drivers just > after OS installation). The user needs to distinguish between

Re: [Spice-devel] [spice-gtk v4 12/13] cd-sharing: implementation of new USB widget

2018-09-19 Thread Christophe Fergeau
On Tue, Sep 18, 2018 at 11:03:56AM +0300, Yuri Benditovich wrote: > Earlier the screenshot of the latest widget (current code) was sent to > internal list for review and no objections were received. For the record, I do have some objections, but I received the screenshot at about the same time

Re: [Spice-devel] [PATCH spice-server] Use PRIxPTR constant for string formatting

2018-09-18 Thread Christophe Fergeau
On Tue, Sep 18, 2018 at 05:56:03AM -0400, Frediano Ziglio wrote: > > > > Hey, > > > > On Fri, Jun 22, 2018 at 11:28:50AM +0100, Frediano Ziglio wrote: > > > These constant are meant to be used in format string for size_t > > > > These constants are actually meant for printing uintptr_t, not

Re: [Spice-devel] [PATCH spice-server] Use PRIxPTR constant for string formatting

2018-09-18 Thread Christophe Fergeau
Hey, On Fri, Jun 22, 2018 at 11:28:50AM +0100, Frediano Ziglio wrote: > These constant are meant to be used in format string for size_t These constants are actually meant for printing uintptr_t, not size_t, the former is 32 bits on 32 bits systems, and size_t can be 64 bits there, see

[Spice-devel] [spice-gtk] display: Trigger wheel scrolling after one 'click'

2018-09-17 Thread Christophe Fergeau
'. This commit adjusts the check so that we try to scroll when the delta is equal or greater than 1.0. https://bugzilla.redhat.com/show_bug.cgi?id=1627823 Signed-off-by: Christophe Fergeau --- src/spice-widget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spice-widget.c b

Re: [Spice-devel] [spice-gtk] widget: Send all smooth-scroll events to the guest

2018-09-17 Thread Christophe Fergeau
On Fri, Sep 14, 2018 at 02:25:39PM +0200, Victor Toso wrote: > From: Victor Toso > > Introduced in 2212f05145c5f1d5, smooth-scroll events were taking > inconsideration that the delta_y value received by GdkEventScroll was > 1.0 but that can be different for other input devices. > > That can

Re: [Spice-devel] [spice-gtk v2 2/2] cd-sharing: Implementation of CD sharing feature

2018-09-13 Thread Christophe Fergeau
On Mon, Sep 10, 2018 at 02:33:45PM +0300, Yuri Benditovich wrote: > This commit contains modified files related to CD sharing feature. > The feature adds ability to share one or more CD images > (or local CD-DVD devices) with the guest by emulating > USB CD devices connected to guest system. My

[Spice-devel] [ANNOUNCE] libcacard 2.6.1 release

2018-08-31 Thread Christophe Fergeau
Hey, I just released libcacard 2.6.1. This fixes a few bugs which were found in the 2.6.0 release, which would causes crashes when using it in spice-gtk/remote-viewer. This release can be found at https://www.spice-space.org/download/libcacard/libcacard-2.6.1.tar.xz and is signed with my GPG

Re: [Spice-devel] [PATCH spice-server] ci: Workaround asciidoc failure

2018-08-31 Thread Christophe Fergeau
On Fri, Aug 31, 2018 at 04:22:12AM -0400, Frediano Ziglio wrote: > > On Thu, Aug 30, 2018 at 06:44:59PM -0300, Eduardo Lima (Etrunko) wrote: > > > Since commit e5a93d7a30f71f01052392d13e33e0373bccee8f asciidoc has been > > > failing. Frediano noticed that there is no such problem with Fedora 27, >

Re: [Spice-devel] [PATCH spice-server] ci: Workaround asciidoc failure

2018-08-31 Thread Christophe Fergeau
On Thu, Aug 30, 2018 at 06:44:59PM -0300, Eduardo Lima (Etrunko) wrote: > Since commit e5a93d7a30f71f01052392d13e33e0373bccee8f asciidoc has been > failing. Frediano noticed that there is no such problem with Fedora 27, > and it looks like asciidoc version 8.6.10 in Fedora 28 is causing > the

Re: [Spice-devel] [libcacard] Prepare for 2.6.1 release

2018-08-31 Thread Christophe Fergeau
I intend to move forward with the release in the next hours, as this should be uncontroversial/a non-event :) Christophe On Wed, Aug 29, 2018 at 08:42:31PM +0200, Christophe Fergeau wrote: > Signed-off-by: Christophe Fergeau > --- > NEWS | 5 + > 1 file changed, 5 insertions(

[Spice-devel] [libcacard] Prepare for 2.6.1 release

2018-08-30 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- NEWS | 5 + 1 file changed, 5 insertions(+) diff --git a/NEWS b/NEWS index a977270..eed777b 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +v2.6.1 +== + +- various bug fixes + v2.6.0 == -- 2.17.1

Re: [Spice-devel] [PATCH libcacard v2 26/35] tests: Make sure we do not crash on bad data to sign

2018-08-22 Thread Christophe Fergeau
Hey, On Tue, Aug 21, 2018 at 06:52:28PM +0200, Jakub Jelen wrote: > On Tue, 2018-08-21 at 17:35 +0200, Christophe Fergeau wrote: > > Hey, > > > > On Thu, Aug 02, 2018 at 11:43:58AM +0200, Jakub Jelen wrote: > > > diff --git a/tests/hwtests.c b/tests/hwtests.c >

[Spice-devel] ANNOUNCE spice-server 0.14.1 release

2018-08-22 Thread Christophe Fergeau
Hey everyone, I just cut a new release in the 0.14.x stable series, this has several regression and security fixes compared to 0.14.0, so upgrading to it is recommended. If you find any bugs or regressions, please report them in our issue tracker:

Re: [Spice-devel] [cacard 1/5] hex_dump: Remove unused arguments

2018-08-22 Thread Christophe Fergeau
On Wed, Aug 22, 2018 at 11:46:59AM +0200, Christophe Fergeau wrote: > Hey, > > On Tue, Aug 21, 2018 at 05:30:50PM +0200, Jakub Jelen wrote: > > On Tue, 2018-08-21 at 17:03 +0200, Christophe Fergeau wrote: > > > hex_dump() callers can theoretically provid

<    1   2   3   4   5   6   7   8   9   10   >