Re: [PATCH virt-viewer 9/9] Report error on attach-only display

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/virt-tools-list

Attachment: pgpwJXkR33yru.pgp
Description: PGP signature

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list

[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux