[Spice-commits] 4 commits - gtk/spice-channel.c gtk/spicy.c spice-client-glib-2.0.pc.in

Marc-André Lureau elmarco at kemper.freedesktop.org
Thu Mar 8 02:08:38 PST 2012


 gtk/spice-channel.c         |    7 +++----
 gtk/spicy.c                 |   11 +++++------
 spice-client-glib-2.0.pc.in |    3 ++-
 3 files changed, 10 insertions(+), 11 deletions(-)

New commits:
commit 580c7fb163fe4f583daee3d07e33f8799486e06a
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Wed Mar 7 22:16:13 2012 +0100

    Do not warn when starting spicy if usbredir is disabled

diff --git a/gtk/spicy.c b/gtk/spicy.c
index 0486610..aa00582 100644
--- a/gtk/spicy.c
+++ b/gtk/spicy.c
@@ -776,9 +776,7 @@ static const char *spice_display_properties[] = {
 
 static const char *spice_gtk_session_properties[] = {
     "auto-clipboard",
-#ifdef USE_USBREDIR
     "auto-usbredir",
-#endif
 };
 
 static const GtkToggleActionEntry tentries[] = {
@@ -807,12 +805,10 @@ static const GtkToggleActionEntry tentries[] = {
         .label       = N_("Automagic clipboard sharing between host and guest"),
         .callback    = G_CALLBACK(menu_cb_bool_prop),
     },{
-#ifdef USE_USBREDIR
         .name        = "auto-usbredir",
         .label       = N_("Auto redirect newly plugged in USB devices"),
         .callback    = G_CALLBACK(menu_cb_bool_prop),
     },{
-#endif
         .name        = "Statusbar",
         .label       = N_("Statusbar"),
         .callback    = G_CALLBACK(menu_cb_statusbar),
@@ -858,9 +854,7 @@ static char ui_xml[] =
 "      <menuitem action='scaling'/>\n"
 "      <menuitem action='disable-inputs'/>\n"
 "      <menuitem action='auto-clipboard'/>\n"
-#ifdef USE_USBREDIR
 "      <menuitem action='auto-usbredir'/>\n"
-#endif
 "    </menu>\n"
 "    <menu action='HelpMenu'>\n"
 "      <menuitem action='About'/>\n"
@@ -1283,6 +1277,11 @@ static spice_window *create_spice_window(spice_connection *conn, int id, SpiceCh
     }
 #endif
 
+#ifndef USE_USBREDIR
+    GtkAction *usbredir = gtk_action_group_get_action(win->ag, "auto-usbredir");
+    gtk_action_set_visible(usbredir, FALSE);
+#endif
+
     gtk_widget_grab_focus(win->spice);
 
     return win;
commit 888edc409cfaca3764dfdc9b9e343a2fad32da9e
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Wed Mar 7 20:27:36 2012 +0100

    sasl: sasl authentication failure results in disconnection
    
    When SASL auth failure happen, the Spice server disconnects the
    client. Sadly, this is not easily distinguishable from an IO error.
    However, since it happens during authentication phase it is better to
    error out an authentication error.

diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index a2bcdae..a960d87 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -1618,8 +1618,7 @@ complete:
 error:
     if (saslconn)
         sasl_dispose(&saslconn);
-    if (!c->has_error)
-        emit_main_context(channel, SPICE_CHANNEL_EVENT, SPICE_CHANNEL_ERROR_AUTH);
+    emit_main_context(channel, SPICE_CHANNEL_EVENT, SPICE_CHANNEL_ERROR_AUTH);
     c->has_error = TRUE; /* force disconnect */
     return FALSE;
 }
commit 8541de7a37e9d8e2b04af89b0e8132a7ffc3bf17
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Wed Mar 7 20:27:26 2012 +0100

    sasl: lower visibility of normal debug message
    
    Those two g_critical() can happen when collecting credentials for the
    first time. It is not something to be warned about, but merely useful
    for debugging

diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index 79775f9..a2bcdae 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -1437,7 +1437,7 @@ restart:
     /* Need to gather some credentials from the client */
     if (err == SASL_INTERACT) {
         if (!spice_channel_gather_sasl_credentials(channel, interact)) {
-            g_critical("Failed to collect auth credentials");
+            SPICE_DEBUG("Failed to collect auth credentials");
             goto error;
         }
         goto restart;
@@ -1518,7 +1518,7 @@ restart:
         if (err == SASL_INTERACT) {
             if (!spice_channel_gather_sasl_credentials(channel,
                                                        interact)) {
-                g_critical("%s", "Failed to collect auth credentials");
+                SPICE_DEBUG("%s", "Failed to collect auth credentials");
                 goto error;
             }
             goto restep;
commit ae6d0b21a0cd6fb9de84da910767b446f23d2db8
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Wed Mar 7 19:56:29 2012 +0100

    build: move @SPICE_GLIB_REQUIRES@ to Requires.private
    
    The libraries listed in Requires aren't needed during build time, they
    are library depedencies. And since this is only needed if linking
    statically, we can safely move them to Requires.private.
    
    Succesfully tested change with compilation against virt-viewer.
    
    Later, this will also help fixing bug rhbz #799112.

diff --git a/spice-client-glib-2.0.pc.in b/spice-client-glib-2.0.pc.in
index 738862e..27d6886 100644
--- a/spice-client-glib-2.0.pc.in
+++ b/spice-client-glib-2.0.pc.in
@@ -7,6 +7,7 @@ Name: spice-client-glib-2.0
 Description: SPICE Client GLib 2.0 library
 Version: @VERSION@
 
-Requires: @SPICE_GLIB_REQUIRES@ spice-protocol
+Requires: spice-protocol
+Requires.private: @SPICE_GLIB_REQUIRES@
 Libs: -L${libdir} -lspice-client-glib-2.0
 Cflags: -I${includedir}/spice-client-glib-2.0


More information about the Spice-commits mailing list