[virt-tools-list] [PATCH virt-viewer v2 3/3] ovirt: Allow to cancel authentication without showing error dialog

Pavel Grunt pgrunt at redhat.com
Tue Mar 17 14:42:31 UTC 2015


Related to https://bugzilla.redhat.com/show_bug.cgi?id=1201604
---
v2: simplified thanks to [PATCH virt-viewer v2 2/3] Exit normally when canceling dialog
---
 src/remote-viewer.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/remote-viewer.c b/src/remote-viewer.c
index 35493f3..278c06e 100644
--- a/src/remote-viewer.c
+++ b/src/remote-viewer.c
@@ -862,6 +862,10 @@ create_ovirt_session(VirtViewerApp *app, const char *uri, GError **err)
                      G_CALLBACK(authenticate_cb), app);
 
     api = ovirt_proxy_fetch_api(proxy, &error);
+    if (virt_viewer_app_get_user_cancelled(app)) {
+        g_clear_error(&error);
+        goto error;
+    }
     if (error != NULL) {
         g_debug("failed to get oVirt 'api' collection: %s", error->message);
         goto error;
-- 
2.3.2




More information about the virt-tools-list mailing list