[virt-tools-list] [PATCH virt-viewer 9/9] Report error on attach-only display
Christophe Fergeau
cfergeau at redhat.com
Fri Nov 14 13:32:11 UTC 2014
Hey,
On Thu, Nov 13, 2014 at 06:20:45PM +0100, Marc-André Lureau wrote:
> Provide error details if the display can only be access through libvirt
> --attach method.
Isn't this somehow related to the previous patch, as before it we would
error out in extract_connection_info() in such cases?
ACK either way.
Christophe
> ---
> src/virt-viewer-app.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
> index e2d9636..5d5c217 100644
> --- a/src/virt-viewer-app.c
> +++ b/src/virt-viewer-app.c
> @@ -1201,12 +1201,15 @@ virt_viewer_app_default_activate(VirtViewerApp *self, GError **error)
> } else if (priv->guri) {
> virt_viewer_app_trace(self, "Opening connection to display at %s", priv->guri);
> return virt_viewer_session_open_uri(VIRT_VIEWER_SESSION(priv->session), priv->guri, error);
> - } else {
> + } else if (priv->ghost) {
> virt_viewer_app_trace(self, "Opening direct TCP connection to display at %s:%s:%s",
> priv->ghost, priv->gport, priv->gtlsport ? priv->gtlsport : "-1");
> return virt_viewer_session_open_host(VIRT_VIEWER_SESSION(priv->session),
> priv->ghost, priv->gport, priv->gtlsport);
> - }
> + } else {
> + g_set_error_literal(error, VIRT_VIEWER_ERROR, VIRT_VIEWER_ERROR_FAILED,
> + _("Display can only be attached through libvirt with --attach"));
> + }
>
> return FALSE;
> }
> --
> 1.9.3
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20141114/53019990/attachment.sig>
More information about the virt-tools-list
mailing list