[virt-tools-list] [PATCH virt-viewer 2/4] ovirt: Avoid showing up authentication dialog more times

Fabiano Fidêncio fabiano at fidencio.org
Tue Mar 17 10:37:19 UTC 2015


On Tue, Mar 17, 2015 at 10:08 AM, Pavel Grunt <pgrunt at redhat.com> wrote:
> It is used the same way in libgovirt examples
> ---
>  src/remote-viewer.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/remote-viewer.c b/src/remote-viewer.c
> index aa838e3..f9f4f92 100644
> --- a/src/remote-viewer.c
> +++ b/src/remote-viewer.c
> @@ -710,7 +710,7 @@ typedef struct {
>
>  static gboolean
>  authenticate_cb(RestProxy *proxy, G_GNUC_UNUSED RestProxyAuth *auth,
> -                G_GNUC_UNUSED gboolean retrying, gpointer user_data)
> +                gboolean retrying, gpointer user_data)
>  {
>      gchar *username = NULL;
>      gchar *password = NULL;
> @@ -718,6 +718,9 @@ authenticate_cb(RestProxy *proxy, G_GNUC_UNUSED RestProxyAuth *auth,
>      gboolean success = FALSE;
>      AuthenticateInfo *authenticate_info = user_data;
>
> +    if (retrying)
> +        return FALSE;
> +
>      g_object_get(proxy,
>                   "username", &username,
>                   NULL);
> --
> 2.3.2
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list

nack!
If the dialog shows up and the user tries his password (but inserts a
wrong one) is expected that the dialog shows up again till the user
inserts a valid username/password or cancels the dialog.

-- 
Fabiano Fidêncio




More information about the virt-tools-list mailing list