On Wed, Jan 11, 2017 at 06:28:06AM -0500, Frediano Ziglio wrote:
> > @@ -1004,24 +964,68 @@ static SndChannelClient *__new_channel(SndChannel
> > *channel, int size, uint32_t c
> >      client->cleanup = cleanup;
> >  
> >      client->channel_client =
> > -        dummy_channel_client_create(RED_CHANNEL(channel), red_client,
> > +        dummy_channel_client_create(RED_CHANNEL(channel), red_client,
> > stream,
> >                                      num_common_caps, common_caps, num_caps,
> >                                      caps);
> >      if (!client->channel_client) {
> >          goto error2;
> >      }
> > +    snd_channel_config_socket(RED_CHANNEL_CLIENT(client->channel_client));
> > +
> 
> This assumes the function never fails.

Ah right, I've changed it to:
+    if 
(!snd_channel_config_socket(RED_CHANNEL_CLIENT(client->channel_client))) {
+        goto error2;
+    }

However, there is no easy way to handle the error in
"sound: Turn {Playback,Record}ChannelClient into GObjects" as the call
to snd_channel_config_socket() is now done in a 'constructed' vfunc.
In this commit, I've chosen to just have
    if (!snd_channel_config_socket(RED_CHANNEL_CLIENT(client->channel_client))) 
{
        g_warning("failed to set sound channel socket parameters");
    }
as the next commit removes direct calls to snd_channel_config_socket()
anyway, and let the generic RedChannel/RedChannelClient code take care
of it.


Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to