[virt-tools-list] [PATCH 2/2] Implement SPICE desktop resizing that takes account of zoom level

Marc-André Lureau marcandre.lureau at gmail.com
Tue Feb 7 18:17:51 UTC 2012


On Tue, Feb 7, 2012 at 6:58 PM, Marc-André Lureau
<marcandre.lureau at gmail.com> wrote:
> On Tue, Feb 7, 2012 at 6:10 PM, Daniel P. Berrange <berrange at redhat.com> wrote:
>> +        if (self->priv->main_channel != NULL)
>> +            return;
>> +        self->priv->main_channel = g_object_ref(channel);
>
> The main channel is destroyed and recreated when reconnecting to use TLS.
>
> It is better to use a weak reference also to be sure the channel is
> destroyed when the connection is gone. Otherwise, there is some extra
> cleanup to do on the client side iirc.

Reading more carefully, session "channel-destroy" signal should be
called when the channel is disconnected and going away, not when it is
reaching refcount = 0.

The main issue is that destroy may be delayed, and you may get a
second main channel before the first one is destroyed, so it needs to
handle that case and not call virt_viewer_display_spice_new() with an
outdated channel..

The error I get when I connect to a spice server with simply a password:

(remote-viewer:18688): GSpice-WARNING **:
(spice-widget.c:1520):update_mouse_mode: code should not be reached
(remote-viewer:18688): GSpice-WARNING **:
(spice-widget.c:652):update_mouse_pointer: code should not be reached
...

-- 
Marc-André Lureau




More information about the virt-tools-list mailing list