From cab8f7450b8af6111c50d563321e5e7e50944479 Mon Sep 17 00:00:00 2001 From: Fabiano FidĂȘncio Date: Thu, 26 Mar 2015 15:13:45 +0100 Subject: virt-viewer: Add a GError arg to update_display() This is part of a small re-factoring that will have all connection errors, when we won't be able to connect regardless of what changes on the remote host, being treated by virt_viewer_app_initial_connect(), avoiding weird behaviors as we have nowadays (like more than one error dialog being shown or having the virt-viewer waiting forever for a guest that will never show up). Related: rhbz#1085216 --- src/virt-viewer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/virt-viewer.c') diff --git a/src/virt-viewer.c b/src/virt-viewer.c index f080e7e..7c73bc5 100644 --- a/src/virt-viewer.c +++ b/src/virt-viewer.c @@ -516,7 +516,7 @@ virt_viewer_extract_connect_info(VirtViewer *self, } static gboolean -virt_viewer_update_display(VirtViewer *self, virDomainPtr dom) +virt_viewer_update_display(VirtViewer *self, virDomainPtr dom, GError **error) { VirtViewerPrivate *priv = self->priv; VirtViewerApp *app = VIRT_VIEWER_APP(self); @@ -532,7 +532,7 @@ virt_viewer_update_display(VirtViewer *self, virDomainPtr dom) g_object_set(app, "guest-name", virDomainGetName(dom), NULL); if (!virt_viewer_app_has_session(app)) { - if (!virt_viewer_extract_connect_info(self, dom, NULL)) + if (!virt_viewer_extract_connect_info(self, dom, error)) return FALSE; } @@ -607,7 +607,7 @@ virt_viewer_domain_event(virConnectPtr conn G_GNUC_UNUSED, break; case VIR_DOMAIN_EVENT_STARTED: - virt_viewer_update_display(self, dom); + virt_viewer_update_display(self, dom, NULL); virt_viewer_app_activate(app, &error); if (error) { /* we may want to consolidate error reporting in @@ -774,7 +774,7 @@ virt_viewer_initial_connect(VirtViewerApp *app, GError **error) goto wait; } - if (!virt_viewer_update_display(self, dom)) + if (!virt_viewer_update_display(self, dom, &err)) goto wait; ret = VIRT_VIEWER_APP_CLASS(virt_viewer_parent_class)->initial_connect(app, &err); -- cgit