[Spice-devel] [PATCH] Fix regression initialising QXL interface

2016-03-09 Thread Frediano Ziglio
st field in QXLInstance was not checked for NULL before initialisation. The additional check make Xspice crash during startup. Reported-by: Francois Gouget --- server/red-qxl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/server/red-qxl.c b/server/red-qxl.c index 1d29496..491046f 100644 --

Re: [Spice-devel] [PATCH] Fix regression initialising QXL interface

2016-03-09 Thread Christophe Fergeau
On Wed, Mar 09, 2016 at 10:25:59AM +, Frediano Ziglio wrote: > st field in QXLInstance was not checked for NULL before > initialisation. > The additional check make Xspice crash during startup. > > Reported-by: Francois Gouget > --- > server/red-qxl.c | 1 - > 1 file changed, 1 deletion(-) >

Re: [Spice-devel] [PATCH] Fix regression initialising QXL interface

2016-03-09 Thread Frediano Ziglio
> > On Wed, Mar 09, 2016 at 10:25:59AM +, Frediano Ziglio wrote: > > st field in QXLInstance was not checked for NULL before > > initialisation. > > The additional check make Xspice crash during startup. > > > > Reported-by: Francois Gouget > > --- > > server/red-qxl.c | 1 - > > 1 file cha

Re: [Spice-devel] How to adapt keymaps for spice-html5

2016-03-09 Thread Eric Grammatico
Hi There, Thanks a lot Christophe for your support. I have now a complete setup supporting fr/latin9 keyboard ! I made a big step in my investigations, here is the summary: 1/ First I confirmed the keyboard settings in spiceqxl.xorg.conf are ignored. -> In order to ensure the right keyboar

Re: [Spice-devel] [PATCH] Fix regression initialising QXL interface

2016-03-09 Thread Christophe Fergeau
On Wed, Mar 09, 2016 at 05:50:45AM -0500, Frediano Ziglio wrote: > > > > On Wed, Mar 09, 2016 at 10:25:59AM +, Frediano Ziglio wrote: > > > st field in QXLInstance was not checked for NULL before > > > initialisation. > > > The additional check make Xspice crash during startup. > > > > > > Re

Re: [Spice-devel] How to adapt keymaps for spice-html5

2016-03-09 Thread Christophe Fergeau
Hey, Great to here! On Wed, Mar 09, 2016 at 10:54:23AM +, Eric Grammatico wrote: > Next step will be to clean up a bit my updates and make the keyboard > selection possible. Yup, I don't know if there will be a way around some kind of keyboard selection to solve this keyboard mapping issue.

Re: [Spice-devel] [PATCH spice-common] RFC: add back codegen

2016-03-09 Thread Christophe Fergeau
Hey, On Fri, Feb 26, 2016 at 06:37:59PM +0100, Marc-André Lureau wrote: > codegen generated code depends on spice-common code (marshaller, messages > etc), The code generated by the python scripts indeed depends on spice-common/common/messages.h and spice-common/common/client_marshallers.h > it

Re: [Spice-devel] [PATCH spice-common] RFC: add back codegen

2016-03-09 Thread Marc-André Lureau
Hi On Wed, Mar 9, 2016 at 2:12 PM, Christophe Fergeau wrote: > Hey, > Thanks for the reply, I was chomping at the bit! I can't wait for releases. > On Fri, Feb 26, 2016 at 06:37:59PM +0100, Marc-André Lureau wrote: >> codegen generated code depends on spice-common code (marshaller, messages >>

Re: [Spice-devel] [PATCH spice-gtk 0/3] Add basic tests for usb-acl-helper

2016-03-09 Thread Fabiano Fidêncio
Marc-André, On Tue, Mar 8, 2016 at 11:33 PM, Marc-André Lureau wrote: > Hi > > - Original Message - >> This just adds a few basic tests to verify that we handle the usb-acl helper >> properly. The first patch is actually a bugfix for an issue that was >> discovered >> while writing the te

Re: [Spice-devel] [PATCH spice-gtk 1/3] usb-acl-helper: Avoid deadlock when cancelled

2016-03-09 Thread Fabiano Fidêncio
On Tue, Mar 8, 2016 at 11:25 PM, Jonathon Jongsma wrote: > cancelled_cb() (which is triggered when the GCancellable's "cancelled" > signal is emitted) called spice_usb_acl_helper_close_acl(), which calls > spice_usb_acl_helper_cleanup(), which in turn calls > g_cancellable_disconnect(). Calling g_

Re: [Spice-devel] [PATCH spice-gtk 0/3] Add basic tests for usb-acl-helper

2016-03-09 Thread Marc-André Lureau
hi On Wed, Mar 9, 2016 at 4:02 PM, Fabiano Fidêncio wrote: > And then we would have to setup the env-var when running make check? :-\ I'd expect it to be set in the test with setenv(). -- Marc-André Lureau ___ Spice-devel mailing list Spice-devel@li

Re: [Spice-devel] [PATCH spice-gtk 0/3] Add basic tests for usb-acl-helper

2016-03-09 Thread Jonathon Jongsma
On Wed, 2016-03-09 at 16:02 +0100, Fabiano Fidêncio wrote: > Marc-André, > > On Tue, Mar 8, 2016 at 11:33 PM, Marc-André Lureau wrote: > > Hi > > > > - Original Message - > > > This just adds a few basic tests to verify that we handle the usb-acl > > > helper > > > properly. The first pa

Re: [Spice-devel] [PATCH spice-gtk 0/3] Add basic tests for usb-acl-helper

2016-03-09 Thread Marc-André Lureau
Hi - Original Message - > On Wed, 2016-03-09 at 16:02 +0100, Fabiano Fidêncio wrote: > > Marc-André, > > > > On Tue, Mar 8, 2016 at 11:33 PM, Marc-André Lureau > > wrote: > > > Hi > > > > > > - Original Message - > > > > This just adds a few basic tests to verify that we handle

Re: [Spice-devel] [PATCH spice-gtk 0/3] Add basic tests for usb-acl-helper

2016-03-09 Thread Fabiano Fidêncio
On Wed, Mar 9, 2016 at 4:18 PM, Marc-André Lureau wrote: > > Hi > > - Original Message - >> On Wed, 2016-03-09 at 16:02 +0100, Fabiano Fidêncio wrote: >> > Marc-André, >> > >> > On Tue, Mar 8, 2016 at 11:33 PM, Marc-André Lureau >> > wrote: >> > > Hi >> > > >> > > - Original Message -

Re: [Spice-devel] How to adapt keymaps for spice-html5

2016-03-09 Thread Eric Grammatico
Hi There, Of course. My suggestion is to create a subfolder where I'll put my modified files named as the following: utils_fr-FR.js atKeynames_fr-FR.js Add the original files in the subdir as: utils_en-US.js atKeynames_en-US.js and add a README file to explain how to create other regionalize

Re: [Spice-devel] [PATCH spice-common] RFC: add back codegen

2016-03-09 Thread Christophe Fergeau
On Wed, Mar 09, 2016 at 03:02:53PM +0100, Marc-André Lureau wrote: > > Longer term, I think it should be possible to autogenerate common/messages.h > > and common/client_marshallers.h as well, which hopefully would avoid > > the issue we currently have. I have some hackish code which generates a >

[Spice-devel] [PATCH 04/15] Introduce spice_char_device_get_interface()

2016-03-09 Thread Frediano Ziglio
From: Christophe Fergeau Hides awkward casting/dereferencing to go from a SpiceCharDeviceInstance to a SpiceCharDeviceInterface --- server/char-device.c | 9 +++-- server/char-device.h | 2 ++ server/reds.c| 6 +++--- server/smartcard.c | 2 +- server/spicevmc.c| 16 ++-

[Spice-devel] [PATCH 13/15] spicevmc: Move SpiceVmcState::pipe_item to RedCharDeviceSpiceVmc

2016-03-09 Thread Frediano Ziglio
From: Christophe Fergeau This pipe item belongs to the char device, not to the spicevmc channel. --- server/spicevmc.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/server/spicevmc.c b/server/spicevmc.c index b619a8b..5506880 100644 --- a/server/spicevmc.c +++

[Spice-devel] [PATCH 00/15] Backported some patches from refactory branches (9th Mar)

2016-03-09 Thread Frediano Ziglio
Changes: - rebased on new master; - merged some patches; - added new patches. Christophe Fergeau (12): Introduce spice_char_device_get_interface() Remove dependency of vdi_port_read_buf_process on RedsState Replace RedsPrivate::char_devs_state with a GList Replace RedsPrivate::mig_wait_dis

[Spice-devel] [PATCH 02/15] Convert Dispatcher and MainDispatcher to GObjects

2016-03-09 Thread Frediano Ziglio
From: Jonathon Jongsma Allows more explicit inheritance relationship, and numerous other advantages. --- server/dispatcher.c | 233 --- server/dispatcher.h | 53 ++- server/main-dispatcher.c | 157 +-- ser

[Spice-devel] [PATCH 03/15] Free dispatchers at exit

2016-03-09 Thread Frediano Ziglio
From: Jonathon Jongsma --- server/red-qxl.c | 7 +++ server/red-qxl.h | 1 + server/reds.c| 2 ++ 3 files changed, 10 insertions(+) diff --git a/server/red-qxl.c b/server/red-qxl.c index d209de6..80e0527 100644 --- a/server/red-qxl.c +++ b/server/red-qxl.c @@ -934,6 +934,13 @@ void red_

[Spice-devel] [PATCH 01/15] Remove last usage of global 'reds' variable

2016-03-09 Thread Frediano Ziglio
From: Jonathon Jongsma This should be the final piece of removing the global reds variable. We still need a global variable to clean up during the atexit() function, but we use a GList of servers (even though we technically don't support multiple servers in the same process yet). Acked-by: Fabia

[Spice-devel] [PATCH 05/15] Remove dependency of vdi_port_read_buf_process on RedsState

2016-03-09 Thread Frediano Ziglio
From: Christophe Fergeau This makes it easier to move the VDIPort API to a different file, and make it as self-contained as possible. --- server/reds.c | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/server/reds.c b/server/reds.c index 736dca6..08

[Spice-devel] [PATCH 10/15] char-device: Add helpers for SpiceCharDeviceCallbacks vfuncs

2016-03-09 Thread Frediano Ziglio
From: Christophe Fergeau Add helper functions wrapping calls to the virtual functions defined in SpiceCharDeviceCallbacks. --- server/char-device.c | 97 +++- 1 file changed, 81 insertions(+), 16 deletions(-) diff --git a/server/char-device.c b/se

[Spice-devel] [PATCH 15/15] smartcard: Turn SmartcardState into a GObject

2016-03-09 Thread Frediano Ziglio
From: Christophe Fergeau This inherits from RedCharDevice. Once all char device states are converted, we can turn the associated vfuncs into RedCharDeviceClass vfuncs. --- server/smartcard.c | 221 + server/smartcard.h | 31 +++- 2 files c

[Spice-devel] [PATCH 12/15] spicevmc: Introduce RedCharDeviceSpiceVmc GObject

2016-03-09 Thread Frediano Ziglio
From: Christophe Fergeau --- server/spicevmc.c | 102 ++ 1 file changed, 88 insertions(+), 14 deletions(-) diff --git a/server/spicevmc.c b/server/spicevmc.c index f2b2494..b619a8b 100644 --- a/server/spicevmc.c +++ b/server/spicevmc.c @@ -61,

[Spice-devel] [PATCH 08/15] Rename red_channel_pipe_item_init to red_pipe_item_init

2016-03-09 Thread Frediano Ziglio
From: Christophe Fergeau The RedChannel argument is not used by red_pipe_item_init. Removing it will make code simpler in places where we don't have a RedChannel directly available. --- server/cache-item.tmpl.c | 3 +-- server/cursor-channel.c | 2 +- server/dcc.c | 26 +--

[Spice-devel] [PATCH 09/15] char-device: Refactor spice_char_device_client_add a bit

2016-03-09 Thread Frediano Ziglio
From: Christophe Fergeau Factor out CharDeviceClientState creation out of spice_char_device_client_add. --- server/char-device.c | 54 ++-- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/server/char-device.c b/server/char-device.c

[Spice-devel] [PATCH 07/15] Replace RedsPrivate::mig_wait_disconnect_clients with a GList

2016-03-09 Thread Frediano Ziglio
From: Christophe Fergeau The code was introducing an intermediate RedsMigWaitDisconnectClient type to hold linked list elements, resulting in a memory handling behaviour very similar to a GList. Using GList directly makes the code shorter and more readable. --- server/reds-private.h | 8 ++-

[Spice-devel] [PATCH 11/15] char-device: Make SpiceCharDeviceState a gobject

2016-03-09 Thread Frediano Ziglio
From: Christophe Fergeau --- server/char-device.c | 586 +-- server/char-device.h | 38 +++- 2 files changed, 422 insertions(+), 202 deletions(-) diff --git a/server/char-device.c b/server/char-device.c index 7c15f6f..41f29e4 100644 --- a/server/

[Spice-devel] [PATCH 06/15] Replace RedsPrivate::char_devs_state with a GList

2016-03-09 Thread Frediano Ziglio
From: Christophe Fergeau The code was introducing an intermediate SpiceCharDevStateItem type to hold linked list elements, resulting in a memory handling behaviour very similar to a GList. Using GList directly makes the code shorter and more readable. --- server/reds-private.h | 7 +-- serv

[Spice-devel] [PATCH 14/15] smartcard: Move private constant to C file

2016-03-09 Thread Frediano Ziglio
From: Christophe Fergeau APDUBufSize is only used within smartcard.c, no need to expose it in smartcard.h --- server/smartcard.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/smartcard.c b/server/smartcard.c index 73c11e9..d417a23 100644 --- a/server/smartcard.c +++ b/server/smar

Re: [Spice-devel] [PATCH 08/15] Rename red_channel_pipe_item_init to red_pipe_item_init

2016-03-09 Thread Frediano Ziglio
> > From: Christophe Fergeau > > The RedChannel argument is not used by red_pipe_item_init. Removing it > will make code simpler in places where we don't have a RedChannel > directly available. > --- > server/cache-item.tmpl.c | 3 +-- > server/cursor-channel.c | 2 +- > server/dcc.c

Re: [Spice-devel] [PATCH 01/15] Remove last usage of global 'reds' variable

2016-03-09 Thread Frediano Ziglio
> From: Jonathon Jongsma > > This should be the final piece of removing the global reds variable. We > still need a global variable to clean up during the atexit() function, > but we use a GList of servers (even though we technically don't support > multiple servers in the same process yet). >

Re: [Spice-devel] [PATCH 02/15] Convert Dispatcher and MainDispatcher to GObjects

2016-03-09 Thread Frediano Ziglio
> > From: Jonathon Jongsma > > Allows more explicit inheritance relationship, and numerous other > advantages. > --- > server/dispatcher.c | 233 > --- > server/dispatcher.h | 53 ++- > server/main-dispatcher.c | 157 ++

Re: [Spice-devel] [PATCH 03/15] Free dispatchers at exit

2016-03-09 Thread Frediano Ziglio
> > From: Jonathon Jongsma > > --- > server/red-qxl.c | 7 +++ > server/red-qxl.h | 1 + > server/reds.c| 2 ++ > 3 files changed, 10 insertions(+) > > diff --git a/server/red-qxl.c b/server/red-qxl.c > index d209de6..80e0527 100644 > --- a/server/red-qxl.c > +++ b/server/red-qxl.c > @

Re: [Spice-devel] [PATCH 04/15] Introduce spice_char_device_get_interface()

2016-03-09 Thread Frediano Ziglio
> From: Christophe Fergeau > > Hides awkward casting/dereferencing to go from a > SpiceCharDeviceInstance to a SpiceCharDeviceInterface > --- > server/char-device.c | 9 +++-- > server/char-device.h | 2 ++ > server/reds.c| 6 +++--- > server/smartcard.c | 2 +- > server/spice

Re: [Spice-devel] [PATCH spice-common] RFC: add back codegen

2016-03-09 Thread Marc-André Lureau
Hi - Original Message - > On Wed, Mar 09, 2016 at 03:02:53PM +0100, Marc-André Lureau wrote: > > > Longer term, I think it should be possible to autogenerate > > > common/messages.h > > > and common/client_marshallers.h as well, which hopefully would avoid > > > the issue we currently have

Re: [Spice-devel] [PATCH 07/15] Replace RedsPrivate::mig_wait_disconnect_clients with a GList

2016-03-09 Thread Frediano Ziglio
> > From: Christophe Fergeau > > The code was introducing an intermediate RedsMigWaitDisconnectClient type to > hold linked list elements, resulting in a memory handling behaviour very > similar to a GList. Using GList directly makes the code shorter and more > readable. > --- > server/reds-pri

Re: [Spice-devel] [PATCH 09/15] char-device: Refactor spice_char_device_client_add a bit

2016-03-09 Thread Frediano Ziglio
> > From: Christophe Fergeau > > Factor out CharDeviceClientState creation out of > spice_char_device_client_add. > --- > server/char-device.c | 54 > ++-- > 1 file changed, 35 insertions(+), 19 deletions(-) > > diff --git a/server/char-device.c

Re: [Spice-devel] [PATCH 06/15] Replace RedsPrivate::char_devs_state with a GList

2016-03-09 Thread Frediano Ziglio
> > From: Christophe Fergeau > > The code was introducing an intermediate SpiceCharDevStateItem type to > hold linked list elements, resulting in a memory handling behaviour very > similar to a GList. Using GList directly makes the code shorter and more > readable. > --- > server/reds-private.h

Re: [Spice-devel] [PATCH spice-common] RFC: add back codegen

2016-03-09 Thread Frediano Ziglio
> > Hi > > - Original Message - > > On Wed, Mar 09, 2016 at 03:02:53PM +0100, Marc-André Lureau wrote: > > > > Longer term, I think it should be possible to autogenerate > > > > common/messages.h > > > > and common/client_marshallers.h as well, which hopefully would avoid > > > > the issu

Re: [Spice-devel] [spice-common v4 3/7] log: Use glib for logging

2016-03-09 Thread Jeremy White
I realize I'm rather late to the party, but this change causes troubles with Xspice. That is, Xorg, on startup, closes stdout. Since the g_log_default_handler writes to stdout for DEBUG and INFO messages, those messages never show up anywhere. The attached patch 'fixes' it. I'm a bit hesitant t

Re: [Spice-devel] [PATCH spice-gtk 1/3] usb-acl-helper: Avoid deadlock when cancelled

2016-03-09 Thread Jonathon Jongsma
On Wed, 2016-03-09 at 16:03 +0100, Fabiano Fidêncio wrote: > On Tue, Mar 8, 2016 at 11:25 PM, Jonathon Jongsma wrote: > > cancelled_cb() (which is triggered when the GCancellable's "cancelled" > > signal is emitted) called spice_usb_acl_helper_close_acl(), which calls > > spice_usb_acl_helper_clea