[Spice-devel] [PATCH spice-gtk] audio: channel-new handler to be after default handlers
Fabiano Fidêncio
fabiano at fidencio.org
Tue Apr 28 10:43:41 PDT 2015
On Tue, Apr 28, 2015 at 10:54 AM, Marc-André Lureau
<marcandre.lureau at redhat.com> wrote:
> Client usually connect to channel-new to connect their
> handlers, such as open-fd.
>
> The audio channel-new handler will call channel_connect() on audio
> channels, which may call open-fd.
>
> However, open-fd can be emitted before the client had a chance to
> connect their handlers (from the channel-new callback).
>
> Connecting after the default handler solves this case.
>
> Fixes:
> https://bugzilla.gnome.org/show_bug.cgi?id=747649
> ---
> gtk/spice-audio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gtk/spice-audio.c b/gtk/spice-audio.c
> index 329ab6a..dfc9b69 100644
> --- a/gtk/spice-audio.c
> +++ b/gtk/spice-audio.c
> @@ -225,7 +225,7 @@ SpiceAudio *spice_audio_new(SpiceSession *session, GMainContext *context,
> return NULL;
>
> spice_g_signal_connect_object(session, "notify::enable-audio", G_CALLBACK(session_enable_audio), self, 0);
> - spice_g_signal_connect_object(session, "channel-new", G_CALLBACK(channel_new), self, 0);
> + spice_g_signal_connect_object(session, "channel-new", G_CALLBACK(channel_new), self, G_CONNECT_AFTER);
> update_audio_channels(self, session);
>
> return self;
> --
> 2.1.0
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
ACK!
--
Fabiano Fidêncio
More information about the Spice-devel
mailing list