[Spice-devel] [PATCH vdagent v3 1/8] Bump GLib version to 2.34

2017-10-10 Thread Jakub Janků
This is required for the following GMainLoop integration, which utilizes some of the new functions/definitions, namely: [definition][GLib version] g_clear_pointer() 2.34 G_SOURCE_REMOVE 2.32 G_SOURCE_CONTINUE 2.32 g_unix_signal_add() 2.30 GLib version accross distributions: - Fedora 26 2

[Spice-devel] [PATCH vdagent v3 4/8] vdagent: Use glib's commandline parser

2017-10-10 Thread Jakub Janků
From: Victor Toso As we already depend on glib, let's remove code that glib can take care of. In this case, we don't need to handle commandline parsing ourselves. In regard the global variables: * static const char * -> static gchar * [only paths] path variables: portdev, fx_dir, vdagentd_soc

[Spice-devel] [PATCH vdagent v3 5/8] vdagent: small refactor on udscs setup function

2017-10-10 Thread Jakub Janků
From: Victor Toso This is mostly a preparatory patch to reduce the usage of globals and the GMainLoop integration. The changes target one function by: * Changing its name from client_setup() to client_setup_sync(): As it important to clarify that the function block; * Removing the 'reconnect'

[Spice-devel] [PATCH vdagent v3 7/8] vdagent: Use GMainLoop

2017-10-10 Thread Jakub Janků
Replace existing main while-loop with GMainLoop. Use GIOChannel with g_io_add_watch() to manage IO from x11 connections in the main loop. udscs_connect() now internally creates GSources by calling g_io_add_watch(). This enables GMainLoop integration, clients no longer need to call udscs_client_fi

[Spice-devel] [PATCH vdagent v3 8/8] udscs: remove client support for select()

2017-10-10 Thread Jakub Janků
Drop functions: - udscs_client_fill_fds() - udscs_client_handle_fds() These became obsolete with GMainLoop integration. Move required code to udscs_server_fill_fds() and udscs_server_handle_fds(), respectively. --- src/udscs.c | 48 ++-- src/udscs.h | 16

[Spice-devel] [PATCH vdagent v3 6/8] vdagent: Introduce SpiceVDAgent object

2017-10-10 Thread Jakub Janků
Related to ongoing work to use GMainLoop and GTK integration Signed-off-by: Victor Toso --- Makefile.am | 3 ++ configure.ac | 1 + src/vdagent/vdagent.c | 140 ++ src/vdagent/vdagent.h | 54 +++ 4 files chan

[Spice-devel] [PATCH vdagent v3 0/8] GMainLoop integration

2017-10-10 Thread Jakub Janků
Changes since v2: - hide "-y" command line option in help - remove 1 second delay introduced in previous versions, when starting vdagent - remove all GSources on VDAgent finalization -- Major changes since v1: - restore original command line options behaviour (note that long names for all opt

[Spice-devel] [PATCH vdagent v3 3/8] vdagent: move file xfer finalize to a function

2017-10-10 Thread Jakub Janků
From: Victor Toso This patch creates vdagent_finalize_file_xfer() to finalize and stop file xfer. Moving this code to a function removes some duplication. Signed-off-by: Victor Toso Acked-by: Frediano Ziglio --- src/vdagent/vdagent.c | 22 -- 1 file changed, 12 insertions(

[Spice-devel] [PATCH vdagent v3 2/8] vdagent: move file xfer initialization to a function

2017-10-10 Thread Jakub Janků
From: Victor Toso This patch creates two functions: - xfer_get_download_directory() - vdagent_init_file_xfer() The logic should be similar as it was before this patch, taking in consideration the global variables fx_open_dir and fx_dir which are set from command line. Signed-off-by: Victor Toso

[Spice-devel] Spice Protocol Missing Headers

2017-10-10 Thread geoff
I just spent the last hour searching for the header that contains "RedInit" according to the Spice protocol specification, frustratingly not finding it. After digging through the client source I finally discovered it wasn't renamed to "SpiceInit", but to "SpiceMsgMainInit". Seems the Spice pr

Re: [Spice-devel] [spice-server] dcc: Fix seamless migration

2017-10-10 Thread Frediano Ziglio
> > On Mon, Oct 09, 2017 at 08:08:24AM -0400, Frediano Ziglio wrote: > > > @@ -1671,6 +1675,10 @@ static void > > > red_channel_client_pipe_clear(RedChannelClient *rcc) > > > > > > void red_channel_client_ack_zero_messages_window(RedChannelClient *rcc) > > > { > > > +if (red_channel_client

Re: [Spice-devel] [spice-server] dcc: Fix seamless migration

2017-10-10 Thread Christophe Fergeau
On Mon, Oct 09, 2017 at 08:08:24AM -0400, Frediano Ziglio wrote: > > @@ -1671,6 +1675,10 @@ static void > > red_channel_client_pipe_clear(RedChannelClient *rcc) > > > > void red_channel_client_ack_zero_messages_window(RedChannelClient *rcc) > > { > > +if (red_channel_client_waiting_for_ack(