[virt-tools-list] [virt-viewer: PATCH 1/3 v2] Let the user cancel the SPICE auth dialog

Christophe Fergeau cfergeau at redhat.com
Wed Sep 24 10:11:43 UTC 2014


On Tue, Sep 23, 2014 at 08:41:26PM +0200, Fabiano Fidêncio wrote:
> virt_viewer_auth_collect_credentials() was recently changed to return
> a boolean instead of an integer (2561c171). This change introduced a
> regression in the authentication dialog behavior, do not letting the
> user cancel it.

"making it impossible for the user to cancel" or something like that.

There is another call to virt_viewer_auth_collect_credentials()
in virt-viewer.c which needs fixing too.

Christophe

> ---
> v2: Fix typo in the short log

> ---
> 
>  src/virt-viewer-session-spice.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
> index 2323832..dd96fdf 100644
> --- a/src/virt-viewer-session-spice.c
> +++ b/src/virt-viewer-session-spice.c
> @@ -482,7 +482,7 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel *channel G_GNUC_UNUSED
>  {
>      VirtViewerSessionSpice *self = VIRT_VIEWER_SESSION_SPICE(session);
>      gchar *password = NULL, *user = NULL;
> -    int ret;
> +    gboolean ret;
>  
>      g_return_if_fail(self != NULL);
>  
> @@ -513,7 +513,7 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel *channel G_GNUC_UNUSED
>                                                     "SPICE",
>                                                     NULL,
>                                                     NULL, &password);
> -        if (ret < 0) {
> +        if (!ret) {
>              g_signal_emit_by_name(session, "session-cancelled");
>          } else {
>              gboolean openfd;
> @@ -542,7 +542,7 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel *channel G_GNUC_UNUSED
>              ret = virt_viewer_auth_collect_credentials(self->priv->main_window,
>                                                         "proxy", NULL,
>                                                         &user, &password);
> -            if (ret < 0) {
> +            if (!ret) {
>                  g_signal_emit_by_name(session, "session-cancelled");
>              } else {
>                  spice_uri_set_user(proxy, user);
> -- 
> 1.9.3
> 
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20140924/82c97045/attachment.sig>


More information about the virt-tools-list mailing list