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

Pavel Grunt pgrunt at redhat.com
Tue Mar 17 09:08:22 UTC 2015


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




More information about the virt-tools-list mailing list