[PATCH virt-viewer] Fix regression when showing disconnect error

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

 



Commit 65ef66e42 introduced a regression due to lack of type-safety on
signals. We mistakenly passed a GError rather than a string error
message to the signal.
---
 src/virt-viewer-session-spice.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
index 8223881..f0cacc8 100644
--- a/src/virt-viewer-session-spice.c
+++ b/src/virt-viewer-session-spice.c
@@ -1100,7 +1100,8 @@ static void
 virt_viewer_session_spice_session_disconnected(G_GNUC_UNUSED SpiceSession *s,
                                                VirtViewerSessionSpice *self)
 {
-    g_signal_emit_by_name(self, "session-disconnected", self->priv->disconnect_error);
+    GError *error = self->priv->disconnect_error;
+    g_signal_emit_by_name(self, "session-disconnected", error ? error->message : NULL);
 }
 
 static void
-- 
2.17.2

_______________________________________________
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