[Spice-commits] 4 commits - gtk/Makefile.am gtk/spice-glib-sym-file gtk/spice-session.c NEWS

Marc-André Lureau elmarco at kemper.freedesktop.org
Fri Dec 21 08:41:18 PST 2012


 NEWS                    |   12 ++++++++++++
 gtk/Makefile.am         |    2 +-
 gtk/spice-glib-sym-file |    8 +++++++-
 gtk/spice-session.c     |   15 ++++++++-------
 4 files changed, 28 insertions(+), 9 deletions(-)

New commits:
commit 4b1c77be76c72fd8144c97adceaeb1cf3554f355
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Fri Dec 21 16:22:45 2012 +0100

    Release v0.15
    
    v0.15
    =====
    
    - Add HTTP Proxy support (only with glib >= 2.26)
    - Add "port" channel support, to allow arbitrary communication on top
      of spice connection
    - usb-redir: fix migration support
    - win32: various keyboard & mouse fixes
    - Add info message when USB dialog is empty
    - Fix initial black screen on some 16bits guest
    - Various bug fixes and improvements

diff --git a/NEWS b/NEWS
index f69909b..5395d5d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,15 @@
+v0.15
+=====
+
+- Add HTTP Proxy support (only with glib >= 2.26)
+- Add "port" channel support, to allow arbitrary communication on top
+  of spice connection
+- usb-redir: fix migration support
+- win32: various keyboard & mouse fixes
+- Add info message when USB dialog is empty
+- Fix initial black screen on some 16bits guest
+- Various bug fixes and improvements
+
 v0.14
 =====
 
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 9f3fb84..5b219a7 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -171,7 +171,7 @@ nodist_libspice_client_gtkinclude_HEADERS =	\
 	$(NULL)
 
 libspice_client_glib_2_0_la_LDFLAGS =	\
-	-version-info 8:0:0		\
+	-version-info 9:0:1		\
 	-no-undefined			\
 	$(GLIB_VERSION_LDFLAGS)		\
 	$(NULL)
commit 12a20d80e071af623f3f1999b65599a822287c40
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Fri Dec 21 16:22:30 2012 +0100

    build-sys: update sym-files

diff --git a/gtk/spice-glib-sym-file b/gtk/spice-glib-sym-file
index 82955f0..641ff4d 100644
--- a/gtk/spice-glib-sym-file
+++ b/gtk/spice-glib-sym-file
@@ -5,6 +5,8 @@ spice_channel_connect
 spice_channel_destroy
 spice_channel_disconnect
 spice_channel_event_get_type
+spice_channel_flush_async
+spice_channel_flush_finish
 spice_channel_get_type
 spice_channel_new
 spice_channel_open_fd
@@ -16,8 +18,8 @@ spice_client_error_quark
 spice_cursor_channel_get_type
 spice_display_channel_get_type
 spice_display_get_primary
-spice_get_option_group
 spice_g_signal_connect_object
+spice_get_option_group
 spice_inputs_button_press
 spice_inputs_button_release
 spice_inputs_channel_get_type
@@ -43,6 +45,10 @@ spice_main_set_display
 spice_main_set_display_enabled
 spice_playback_channel_get_type
 spice_playback_channel_set_delay
+spice_port_channel_get_type
+spice_port_event
+spice_port_write_async
+spice_port_write_finish
 spice_record_channel_get_type
 spice_record_send_data
 spice_session_connect
commit 95321c4a6241baad2d4fc89d34af76d5e9a6a982
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Thu Dec 20 16:55:29 2012 +0100

    session: improve open_host() clean-up
    
    Make sure the GSocketClient is unref when leaving the function, and
    not left around in some unfinished async state.

diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index 0d858fb..b18d67b 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -1585,6 +1585,7 @@ struct spice_open_host {
     GCancellable *cancellable;
     GError *error;
     GSocket *socket;
+    GSocketClient *client;
 };
 
 static void socket_client_connect_ready(GObject *source_object, GAsyncResult *result,
@@ -1604,19 +1605,16 @@ static void socket_client_connect_ready(GObject *source_object, GAsyncResult *re
 
 end:
     g_clear_object(&connection);
-    g_clear_object(&client);
-
     coroutine_yieldto(open_host->from, NULL);
 }
 
 /* main context */
 static void open_host_connectable_connect(spice_open_host *open_host, GSocketConnectable *connectable)
 {
-    GSocketClient *client;
-
     SPICE_DEBUG("connecting %p...", open_host);
-    client = g_socket_client_new();
-    g_socket_client_connect_async(client, connectable, open_host->cancellable,
+
+    g_socket_client_connect_async(open_host->client, connectable,
+                                  open_host->cancellable,
                                   socket_client_connect_ready, open_host);
 }
 
@@ -1709,10 +1707,12 @@ GSocket* spice_session_channel_open_host(SpiceSession *session, SpiceChannel *ch
     if ((use_tls && !s->tls_port) || (!use_tls && !s->port))
         return NULL;
 
+    // FIXME: make open_host() cancellable
     open_host.from = coroutine_self();
     open_host.session = session;
     open_host.channel = channel;
     open_host.port = atoi(use_tls ? s->tls_port : s->port);
+    open_host.client = g_socket_client_new();
     g_idle_add(open_host_idle_cb, &open_host);
 
     /* switch to main loop and wait for connection */
@@ -1729,6 +1729,7 @@ GSocket* spice_session_channel_open_host(SpiceSession *session, SpiceChannel *ch
         g_socket_set_keepalive(open_host.socket, TRUE);
     }
 
+    g_clear_object(&open_host.client);
     g_clear_object(&open_host.proxy);
     return open_host.socket;
 }
commit 753a96837c4a02a4017c3eb1f1e4cfe260aa3c28
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Thu Dec 20 16:55:29 2012 +0100

    session: do not unref() NULL connection
    
     #3  0x00007ffff59cfb3b in g_object_unref (_object=0x0) at gobject.c:2916
     #4  0x00007ffff6ea9c20 in socket_client_connect_ready (source_object=0x87ced0,
         result=0x8a58f0, data=0x7fffe3fffa80) at spice-session.c:1606
     #5  0x00007ffff5ea1278 in g_task_return_now (task=0x8a58f0) at gtask.c:1102

diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index 06c1629..0d858fb 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -1603,8 +1603,8 @@ static void socket_client_connect_ready(GObject *source_object, GAsyncResult *re
     g_object_ref(open_host->socket);
 
 end:
-    g_object_unref(connection);
-    g_object_unref(client);
+    g_clear_object(&connection);
+    g_clear_object(&client);
 
     coroutine_yieldto(open_host->from, NULL);
 }


More information about the Spice-commits mailing list