[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] [PATCH virt-viewer] spice: show an error dialog if password is invalid



Looks good, ACK.

On 08/02/2013 04:54 PM, Marc-André Lureau wrote:
Error message should show up when input the wrong password for spice
guests as vnc guests.

https://bugzilla.redhat.com/show_bug.cgi?id=990883
---
  src/virt-viewer-session-spice.c | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
index 656814c..f574539 100644
--- a/src/virt-viewer-session-spice.c
+++ b/src/virt-viewer-session-spice.c
@@ -53,6 +53,7 @@ struct _VirtViewerSessionSpicePrivate {
      int channel_count;
      int usbredir_channel_count;
      gboolean has_sw_smartcard_reader;
+    guint pass_try;
  };

  #define VIRT_VIEWER_SESSION_SPICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), VIRT_VIEWER_TYPE_SESSION_SPICE, VirtViewerSessionSpicePrivate))
@@ -488,6 +489,11 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel *channel G_GNUC_UNUSED
          break;
      case SPICE_CHANNEL_ERROR_AUTH:
          DEBUG_LOG("main channel: auth failure (wrong password?)");
+
+        if (self->priv->pass_try++)
+            g_signal_emit_by_name(session, "session-auth-failed",
+                                  _("invalid password"));
+
          int ret = virt_viewer_auth_collect_credentials(self->priv->main_window,
                                                         "SPICE",
                                                         NULL,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]