On Tue, Jan 24, 2017 at 08:45:35AM -0500, Frediano Ziglio wrote:

Hey,


> > diff --git a/server/sound.c b/server/sound.c
> > index 1f88149..a53ebcd 100644
> > --- a/server/sound.c
> > +++ b/server/sound.c
> > @@ -851,6 +851,9 @@ static void snd_playback_send(void* data)
> >          return;
> >      }
> >  
> > +    client->command &= SND_PLAYBACK_MODE_MASK|SND_PLAYBACK_PCM_MASK|
> > +                       SND_CTRL_MASK|SND_VOLUME_MUTE_MASK|
> > +                       SND_MIGRATE_MASK|SND_PLAYBACK_LATENCY_MASK;
> >      while (client->command) {
> >          if (client->command & SND_PLAYBACK_MODE_MASK) {
> >              if (!playback_send_mode(playback_client)) {
> 
> Maybe all this can be avoided having at the end code like
> 
> for (;;) {
>    // handle this flags
>    // handle this other
>    // other...
> 
>    // all flags processes
>    client->command = 0;
>    return;
> }
> snd_send(client);


Not sure I fully understand your suggestion here :-/
I don't think it's too bad to filter the invalid commands before hand.

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