[virt-tools-list] [PATCH virt-viewer] "Unable to connect to the graphic server" error on guest shutdown
Daniel P. Berrange
berrange at redhat.com
Wed Nov 21 09:05:45 UTC 2012
On Tue, Nov 20, 2012 at 01:04:55PM +0100, Marc-André Lureau wrote:
> In virt_viewer_app_activate(), priv->connected is set to FALSE when
> the connect/active is successfull. However, we rely on it to know
> whether the virt_viewer_app_disconnected() is an error, so only set it
> to FALSE when connection failed.
>
> Fixes:
> https://bugzilla.redhat.com/show_bug.cgi?id=875697
> ---
> src/virt-viewer-app.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
> index 50a3a2d..6b3ad6d 100644
> --- a/src/virt-viewer-app.c
> +++ b/src/virt-viewer-app.c
> @@ -890,15 +890,17 @@ virt_viewer_app_activate(VirtViewerApp *self)
>
> ret = VIRT_VIEWER_APP_GET_CLASS(self)->activate(self);
>
> - if (ret != -1) {
> - virt_viewer_app_show_status(self, _("Connecting to graphic server"));
> + if (ret == -1) {
> priv->connected = FALSE;
> + } else {
> + virt_viewer_app_show_status(self, _("Connecting to graphic server"));
> priv->cancelled = FALSE;
> priv->active = TRUE;
> - priv->grabbed = FALSE;
> - virt_viewer_app_update_title(self);
> }
>
> + priv->grabbed = FALSE;
> + virt_viewer_app_update_title(self);
> +
> return ret;
> }
>
ACK
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the virt-tools-list
mailing list