[Spice-devel] [PATCH vdagent-linux 2/6] udscs: return void in udscs_write{, _all}()

2018-09-04 Thread Jakub Janků
The functions would return -1 only if malloc() failed, otherwise 0. Since malloc() was replaced by g_malloc(), which terminates the program if the allocation fails, return void instead. Signed-off-by: Jakub Janků --- src/udscs.c | 13 - src/udscs.h | 5 ++--- 2 files changed, 6

[Spice-devel] [PATCH vdagent-linux 5/6] vdagentd: move code to do_agent_file_xfer_status()

2018-09-04 Thread Jakub Janků
Move code handling VDAGENTD_FILE_XFER_STATUS messages from agent_read_complete() to a separate function to make the switch statement less cluttered. Improve formatting a bit. Signed-off-by: Jakub Janků --- src/vdagentd/vdagentd.c | 61 + 1 file changed,

[Spice-devel] [PATCH vdagent-linux 3/6] vport: return void in vdagent_virtio_port_write{, _start}()

2018-09-04 Thread Jakub Janků
The functions would return -1 only if malloc() failed, otherwise 0. Since malloc() was replaced by g_malloc(), which terminates the program if the allocation fails, return void instead. Signed-off-by: Jakub Janků --- src/vdagentd/virtio-port.c | 15 +-- src/vdagentd/virtio-port.h |

[Spice-devel] [PATCH vdagent-linux 4/6] vdagentd: move code to do_agent_xorg_resolution()

2018-09-04 Thread Jakub Janků
Move code handling VDAGENTD_GUEST_XORG_RESOLUTION messages from agent_read_complete() to a separate function to make the switch statement less cluttered. Remove unnecessary res variable. Signed-off-by: Jakub Janků --- src/vdagentd/vdagentd.c | 62 + 1

[Spice-devel] [PATCH vdagent-linux 6/6] file-xfer: remove obsolete GLIB_CHECK_VERSION

2018-09-04 Thread Jakub Janků
Required GLib version was bumped from 2.28 to 2.34 by 61fc548fe1a323dd2344c8ae267e3ce05e86da7d. Signed-off-by: Jakub Janků --- src/vdagent/file-xfers.c | 5 - 1 file changed, 5 deletions(-) diff --git a/src/vdagent/file-xfers.c b/src/vdagent/file-xfers.c index 6461d05..0fabe7e 100644 ---

[Spice-devel] [PATCH vdagent-linux 0/6] clean-up series

2018-09-04 Thread Jakub Janků
Hi, this series represents an "offshoot" from the GLib integration series I sent earlier. It consists of patches that could be applied sooner than the rest of the patches in the series and (hopefully) don't require as many iterations and testing as those that substantially rewrite udscs,

[Spice-devel] [PATCH vdagent-linux 1/6] move to GLib memory functions

2018-09-04 Thread Jakub Janků
Some older parts of the code currently use memory functions defined in stdlib.h and usually handle allocation errors. On the other hand, newer parts of the code and GLib/GTK+ functions themselves commonly use wrappers provided by GLib that terminate the program when there isn't enough memory. So

Re: [Spice-devel] [PATCH spice-gtk] build: Make usb-acl-helper test work under Meson

2018-09-04 Thread Frediano Ziglio
> > On 09/03/2018 01:34 PM, Frediano Ziglio wrote: > > Meson waits for pipes (stdout and stderr) to be not readable but > > our mocking helper does not close these handles causing Meson > > to give some problems. > > > > Can you elaborate on the "some problems"? Also this patch looks more >

Re: [Spice-devel] [PATCH spice-gtk] build: Make usb-acl-helper test work under Meson

2018-09-04 Thread Eduardo Lima (Etrunko)
On 09/03/2018 01:34 PM, Frediano Ziglio wrote: > Meson waits for pipes (stdout and stderr) to be not readable but > our mocking helper does not close these handles causing Meson > to give some problems. > Can you elaborate on the "some problems"? Also this patch looks more like a workaround from

[Spice-devel] [PATCH vdagent-linux] vdagentd: parse argv using GLib

2018-09-04 Thread Jakub Janků
All command line options now have long names as they are required by GLib. So the supported command line options now are: -h, --help -d, --debug -s, --virtio-serial-port-path -S, --vdagentd-socket -u, --uinput-device -f, --fake-uinput -x, --foreground -o,

Re: [Spice-devel] [RFC spice-vdagent 01/18] vdagentd: parse argv using GLib

2018-09-04 Thread Victor Toso
On Tue, Sep 04, 2018 at 02:44:29PM +0200, Jakub Janku wrote: > > > > > +if (err) { > > > > > +g_printerr("Invalid arguments, %s\n", err->message); > > > > > > > > We don't use g_printerr() or any g_log() in this code > > > > yet. > > > > > > I think I copied it from the vdagent.c where

Re: [Spice-devel] [RFC spice-vdagent 00/18] GLib integration

2018-09-04 Thread Victor Toso
Hi, On Tue, Sep 04, 2018 at 02:11:46PM +0200, Jakub Janku wrote: > > > As a result, the reference to GIOStream is not released and > > > the FD is not closed. > > > > > > So the problem aren't the references to VDAgentConnection > > > itself, but rather the GLib's internal references to the > > >

Re: [Spice-devel] [RFC spice-vdagent 01/18] vdagentd: parse argv using GLib

2018-09-04 Thread Jakub Janku
On Tue, Sep 4, 2018 at 7:02 AM Victor Toso wrote: > > Hi, > > On Mon, Sep 03, 2018 at 06:06:01PM +0200, Jakub Janku wrote: > > Hi, > > > > > I think that after "vdagentd: use GMainLoop" patch, we should > > > also include glib's command line options. > > > > Not sure what you are referring to

Re: [Spice-devel] [RFC spice-vdagent 00/18] GLib integration

2018-09-04 Thread Jakub Janku
Hi, On Tue, Sep 4, 2018 at 7:33 AM Victor Toso wrote: > > Hi, > > On Mon, Sep 03, 2018 at 09:03:38PM +0200, Jakub Janku wrote: > > I do agree that turning VDAgentConnection into a GObject is > > probably a good idea, however, I do not see how it could help > > us in this situation. Am I missing

Re: [Spice-devel] [vdagent-linux v1] spice-vdagent.desktop: Change autostart to Desktop stage

2018-09-04 Thread Victor Toso
Hi, On Tue, Sep 04, 2018 at 01:09:12PM +0300, Uri Lublin wrote: > On 09/04/2018 11:57 AM, Victor Toso wrote: > > From: Victor Toso > > > > It is possible that g_get_user_special_dir() return NULL for > > G_USER_DIRECTORY_DESKTOP or G_USER_DIRECTORY_DOWNLOAD; This is a sure > > thing to happen

Re: [Spice-devel] [PATCH spice-gtk 1/2] meson: Remove unecessary spice_gtk_link_args variable

2018-09-04 Thread Frediano Ziglio
> > Signed-off-by: Eduardo Lima (Etrunko) Acked-by: Frediano Ziglio Still CI is not succeeding. Frediano > --- > doc/reference/meson.build | 1 - > meson.build | 1 - > src/meson.build | 11 +++ > 3 files changed, 3 insertions(+), 10 deletions(-) > > diff

Re: [Spice-devel] [PATCH spice-gtk 2/2] meson: Drop calls to declare_dependency() where appropriate

2018-09-04 Thread Frediano Ziglio
> > No need to use it when we can actually specify the parameters in the > actual gnome.generate_gir() function calls. We still keep it in the case > of gnome.gtkdoc(), as there is no way to specify the libraries to link > with. > > Signed-off-by: Eduardo Lima (Etrunko) In previous commit you

Re: [Spice-devel] [vdagent-linux v1] spice-vdagent.desktop: Change autostart to Desktop stage

2018-09-04 Thread Uri Lublin
On 09/04/2018 11:57 AM, Victor Toso wrote: From: Victor Toso It is possible that g_get_user_special_dir() return NULL for G_USER_DIRECTORY_DESKTOP or G_USER_DIRECTORY_DOWNLOAD; This is a sure thing to happen in case xdg-user-dirs hasn't been run yet. Keeping spice-vdagent to run on

[Spice-devel] [vdagent-linux v1] spice-vdagent.desktop: Change autostart to Desktop stage

2018-09-04 Thread Victor Toso
From: Victor Toso It is possible that g_get_user_special_dir() return NULL for G_USER_DIRECTORY_DESKTOP or G_USER_DIRECTORY_DOWNLOAD; This is a sure thing to happen in case xdg-user-dirs hasn't been run yet. Keeping spice-vdagent to run on Initialization stage of X-GNOME-Autostart-Phase could