summaryrefslogtreecommitdiffstats
path: root/src/virt-viewer.c
diff options
context:
space:
mode:
authorFabiano FidĂȘncio <fidencio@redhat.com>2015-03-26 15:13:45 +0100
committerFabiano FidĂȘncio <fidencio@redhat.com>2015-03-27 16:06:27 +0100
commitcab8f7450b8af6111c50d563321e5e7e50944479 (patch)
tree02308e76db2dfc28cca38db3bec02cdf46efdf05 /src/virt-viewer.c
parent2c03eacc2d71adb260fbf84b3b691b64fad15184 (diff)
downloadvirt-viewer-cab8f7450b8af6111c50d563321e5e7e50944479.tar.gz
virt-viewer-cab8f7450b8af6111c50d563321e5e7e50944479.tar.xz
virt-viewer-cab8f7450b8af6111c50d563321e5e7e50944479.zip
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
Diffstat (limited to 'src/virt-viewer.c')
-rw-r--r--src/virt-viewer.c8
1 files changed, 4 insertions, 4 deletions
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);