Skip to contentSkip to conversation

Incorrect revents in polypaudio plugin

PATCH Applied Pierre Ossman 2 participants 2 messages Mar 7, 2006 – Mar 8, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Incorrect revents in polypaudio plugin

The revent flags POLLIN/POLLOUT got switched in the Polypaudio plugin. Most applications check both so it went unnoticed until now.

Index: polyp/pcm_polyp.c
===================================================================
RCS file: /cvsroot/alsa/alsa-plugins/polyp/pcm_polyp.c,v retrieving revision 1.2

pcm_polyp.c +2 -2
diff -u -r1.2 pcm_polyp.c
@@ -314,9 +314,9 @@
      */
     if (pcm->last_size >= pcm->buffer_attr.minreq) {
         if (io->stream == SND_PCM_STREAM_PLAYBACK)
-            *revents |= POLLIN;
-        else
             *revents |= POLLOUT;
+        else
+            *revents |= POLLIN;
     }
 
     return 0;
Applied
#1 lore raw

At Tue, 07 Mar 2006 18:19:24 +0100,

Quoted 5 lines · Pierre Ossman

The revent flags POLLIN/POLLOUT got switched in the Polypaudio plugin. Most applications check both so it went unnoticed until now.

Applied to CVS. Thanks.

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642