[Spice-devel] [PATCH vdagent 11/11] vdagent: Use GMainLoop

2017-09-26 Thread Jakub Janků
Replace our existing loop with GMainLoop. Use GIOChannels with g_io_add_watch() to manage IO from udscs and x11 connections in the main loop. Add function spice_vdagent_write_msg() which internally uses udscs_write(), but on top of that calls g_io_add_watch(, G_IO_OUT, ,). Once the fd becomes

[Spice-devel] [PATCH vdagent 01/11] Bump GLib version to 2.34

2017-09-26 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 --- configure.ac | 2 +- 1 file changed, 1

[Spice-devel] [PATCH vdagent 07/11] vdagent: small refactor on udscs setup function

2017-09-26 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; *

[Spice-devel] [PATCH vdagent 05/11] vdagent: Use glib's commandline parser

2017-09-26 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:

[Spice-devel] [PATCH vdagent 03/11] vdagent: move file xfer initialization to a function

2017-09-26 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.

[Spice-devel] [PATCH vdagent 04/11] vdagent: move file xfer finalize to a function

2017-09-26 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 --- src/vdagent/vdagent.c | 22 -- 1 file

[Spice-devel] [PATCH vdagent 00/11] GMainLoop integration

2017-09-26 Thread Jakub Janků
Hi, this patchset is supposed to be the start of tighter GLib and GTK+ integration in spice vdagent. The goal for the future is to replace X11-specific code with GTK/GLib. Main changes: - Use GLib's command line parser - Add SpiceVDAgent GObject - Replace main while-loop with GMainLoop Known

[Spice-devel] [PATCH vdagent 10/11] udscs: Add udscs_is_write_pending()

2017-09-26 Thread Jakub Janků
This is necessary for the following GMainLoop integration. --- src/udscs.c | 6 ++ src/udscs.h | 4 2 files changed, 10 insertions(+) diff --git a/src/udscs.c b/src/udscs.c index 2761cbb..4a0e193 100644 --- a/src/udscs.c +++ b/src/udscs.c @@ -359,6 +359,12 @@ int

[Spice-devel] [PATCH vdagent 08/11] vdagent: Introduce SpiceVDAgent object

2017-09-26 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 | 149 +++--- src/vdagent/vdagent.h | 54

[Spice-devel] [PATCH vdagent 09/11] udscs: allow fd control outside udscs

2017-09-26 Thread Jakub Janků
From: Victor Toso This patch export two existing functions `udscs_do_read()` and `udscs_do_write()` and also creates a new one `udscs_client_get_fd()`. The intention of this functions is to allow vdagent to check if connection's socket is ready to read or write. This will

[Spice-devel] [PATCH vdagent 02/11] vdagent: remove fx_dir magic values

2017-09-26 Thread Jakub Janků
--- src/vdagent/vdagent.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/vdagent/vdagent.c b/src/vdagent/vdagent.c index dfb9284..6b4c127 100644 --- a/src/vdagent/vdagent.c +++ b/src/vdagent/vdagent.c @@ -168,7 +168,7 @@ static void usage(FILE *fp)

[Spice-devel] [PATCH vdagent 06/11] udscs: add userdata to read_callback

2017-09-26 Thread Jakub Janků
From: Victor Toso Introduce new parameter to the functions: * udscs_create_server() - only used in vdagentd.c * udscs_connect() - only used in vdagent.c Related changes were necessary to the predefined callback types and its implementations to include this new

[Spice-devel] Announcing spice 0.13.91 release

2017-09-26 Thread Christophe Fergeau
Hey everyone, Another unstable spice-server release, not a lot of bugs found after the release of 0.13.90, hopefully this means we are in a good shape... a new spice-server unstable release. This release should be the final release candidate for 0.14.0, which will be released next week if no big