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

Fabiano Fidêncio fidencio at redhat.com
Thu Apr 9 11:36:50 UTC 2015


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);
         }
     }
         break;
-- 
2.3.4




More information about the virt-tools-list mailing list