[virt-tools-list] [virt-viewer][PATCH 2/3] session-spice: Destroy the channel instead of emit a "session-disconnect" signal

Christophe Fergeau cfergeau at redhat.com
Thu Apr 9 12:16:59 UTC 2015


On Thu, Apr 09, 2015 at 01:36:50PM +0200, Fabiano Fidêncio wrote:
> Whenever we reach this branch while connecting we will  create a new
> spice session (from the dialog showed to the user). So, destroying the
> channel on this situation seems sane enough.
> It also avoids an error dialog to be popped out twice with (basically)
> the same information.
> 
> Related to: rhbz#1085216
> ---
>  src/virt-viewer-session-spice.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
> index 851d2f6..10dd149 100644
> --- a/src/virt-viewer-session-spice.c
> +++ b/src/virt-viewer-session-spice.c
> @@ -610,7 +610,7 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel *channel,
>                  spice_session_connect(self->priv->session);
>              }
>          } else {
> -            g_signal_emit_by_name(session, "session-disconnected", error ? error->message : NULL);
> +            virt_viewer_session_spice_channel_destroy(NULL, channel, session);

Are the SPICE_CHANNEL_ERROR_IO, SPICE_CHANNEL_ERROR_LINK,
SPICE_CHANNEL_ERROR_TLS below different or should they also destroy the
channel rather than emitting a "session-disconnected" signal?

Christophe
-------------- 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/20150409/0f5d6270/attachment.sig>


More information about the virt-tools-list mailing list