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

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

 



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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux