[virt-tools-list] [PATCH virt-viewer] Fix regression when showing disconnect error
Jonathon Jongsma
jjongsma at redhat.com
Thu Jan 24 22:51:30 UTC 2019
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
More information about the virt-tools-list
mailing list