[Spice-commits] 3 commits - gtk/channel-main.c gtk/spice-channel.c gtk/spice-session.c

Marc-André Lureau elmarco at kemper.freedesktop.org
Fri Oct 19 10:30:00 PDT 2012


 gtk/channel-main.c  |    4 ++++
 gtk/spice-channel.c |    2 +-
 gtk/spice-session.c |   18 ++++++++++++++++++
 3 files changed, 23 insertions(+), 1 deletion(-)

New commits:
commit 4e62f1a363d0749b9d342dcceb0fdba58a9ab87d
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Thu Oct 18 19:40:38 2012 +0200

    Empty host subject from qemu should only validate hostname
    
    Validate empty host subject from qemu exactly like when no explicit
    host subject is specified.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=858228

diff --git a/gtk/channel-main.c b/gtk/channel-main.c
index 21428cf..6b9ba8d 100644
--- a/gtk/channel-main.c
+++ b/gtk/channel-main.c
@@ -1729,6 +1729,10 @@ static gboolean migrate_connect(gpointer data)
                          "verify", SPICE_SESSION_VERIFY_PUBKEY,
                          NULL);
             g_byte_array_unref(pubkey);
+        } else if (info->cert_subject_size == 0 ||
+                   strlen((const char*)info->cert_subject_data) == 0) {
+            /* only verify hostname if no cert subject */
+            g_object_set(mig->session, "verify", SPICE_SESSION_VERIFY_HOSTNAME, NULL);
         } else {
             gchar *subject = g_alloca(info->cert_subject_size + 1);
             strncpy(subject, (const char*)info->cert_subject_data, info->cert_subject_size);
commit c2829301e1f4a5d7566cc534e8cc1d33e852b164
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Thu Oct 18 15:21:19 2012 +0200

    channel: improve debugging message
    
    The open_host() can return FALSE when the connection is discarded or
    skipped. Improve the message to not indicate a failure.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=858232

diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index c5e8d9f..fea46d7 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -2119,7 +2119,7 @@ reconnect:
     c->sock = spice_session_channel_open_host(c->session, channel, c->tls);
     if (c->sock == NULL) {
         if (!c->tls) {
-            CHANNEL_DEBUG(channel, "connection failed, trying with TLS port");
+            CHANNEL_DEBUG(channel, "trying with TLS port");
             c->tls = true; /* FIXME: does that really work with provided fd */
             goto reconnect;
         } else {
commit f95b7405472c7de25912381e4d3cb9a0c804e1bf
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Thu Oct 18 12:01:29 2012 +0200

    Print list of supported channels
    
    https://bugzilla.redhat.com/show_bug.cgi?id=834513

diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index 28ebe8a..526d05b 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -118,10 +118,28 @@ static guint signals[SPICE_SESSION_LAST_SIGNAL];
 static void spice_session_init(SpiceSession *session)
 {
     SpiceSessionPrivate *s;
+    gchar *channels;
 
     SPICE_DEBUG("New session (compiled from package " PACKAGE_STRING ")");
     s = session->priv = SPICE_SESSION_GET_PRIVATE(session);
 
+    channels = g_strjoin(", ",
+                         spice_channel_type_to_string(SPICE_CHANNEL_MAIN),
+                         spice_channel_type_to_string(SPICE_CHANNEL_DISPLAY),
+                         spice_channel_type_to_string(SPICE_CHANNEL_INPUTS),
+                         spice_channel_type_to_string(SPICE_CHANNEL_CURSOR),
+                         spice_channel_type_to_string(SPICE_CHANNEL_PLAYBACK),
+                         spice_channel_type_to_string(SPICE_CHANNEL_RECORD),
+#ifdef USE_SMARTCARD
+                         spice_channel_type_to_string(SPICE_CHANNEL_SMARTCARD),
+#endif
+#ifdef USE_USBREDIR
+                         spice_channel_type_to_string(SPICE_CHANNEL_USBREDIR),
+#endif
+                         NULL);
+    SPICE_DEBUG("Supported channels: %s", channels);
+    g_free(channels);
+
     ring_init(&s->channels);
     cache_init(&s->images, "image");
     cache_init(&s->palettes, "palette");


More information about the Spice-commits mailing list