diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2014-11-13 18:20:42 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2014-11-25 13:00:50 +0100 |
commit | 9e2f9ea0643c18a7d8a499fc0391b7daf06abbd0 (patch) | |
tree | 23bec717ed955874afe45600a9c7c451db761fcf /src/virt-viewer.c | |
parent | 7931161d597a4ed36f8696c7131209b05b87edb6 (diff) | |
download | virt-viewer-9e2f9ea0643c18a7d8a499fc0391b7daf06abbd0.tar.gz virt-viewer-9e2f9ea0643c18a7d8a499fc0391b7daf06abbd0.tar.xz virt-viewer-9e2f9ea0643c18a7d8a499fc0391b7daf06abbd0.zip |
Simplify virt_viewer_initial_connect()
- remove need for waitvm if the display server isn't yet started (note:
this function might be untested, I am not sure relying on libvirt events
is enough)
Diffstat (limited to 'src/virt-viewer.c')
-rw-r--r-- | src/virt-viewer.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/virt-viewer.c b/src/virt-viewer.c index 735ac72..1a64f84 100644 --- a/src/virt-viewer.c +++ b/src/virt-viewer.c @@ -685,18 +685,11 @@ virt_viewer_initial_connect(VirtViewerApp *app, GError **error) goto wait; } ret = virt_viewer_update_display(self, dom); - if (ret) + if (ret) { ret = VIRT_VIEWER_APP_CLASS(virt_viewer_parent_class)->initial_connect(app, &err); if (!ret) { - if (priv->waitvm) { - virt_viewer_app_show_status(app, _("Waiting for guest domain to start server")); - goto wait; - } else { - g_set_error_literal(&err, VIRT_VIEWER_ERROR, VIRT_VIEWER_ERROR_FAILED, - _("Failed to activate viewer")); - g_debug("%s", err->message); - goto cleanup; - } + virt_viewer_app_show_status(app, _("Waiting for guest domain to start server")); + goto wait; } wait: |