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
> [email protected]
> https://www.redhat.com/mailman/listinfo/virt-tools-list
pgpnQTK1UT7mS.pgp
Description: PGP signature
_______________________________________________ virt-tools-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/virt-tools-list
