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

Eduardo Lima (Etrunko) etrunko at redhat.com
Mon Jan 28 16:49:28 UTC 2019


On 1/24/19 8:51 PM, Jonathon Jongsma wrote:
> 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
> 
Acked-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>

-- 
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etrunko at redhat.com




More information about the virt-tools-list mailing list