]> git.alsa-project.org Git - alsa-oss.git/commitdiff
Fixed O_NONBLOCK behaviour for PCM devices
authorMatthew Hodgson <matthew@mxtelecom.com>
Sat, 19 Mar 2005 15:11:18 +0000 (15:11 +0000)
committerJaroslav Kysela <perex@perex.cz>
Sat, 19 Mar 2005 15:11:18 +0000 (15:11 +0000)
The problem appears to be a typo in alsa-oss/alsa/pcm.c:oss_dsp_open(),
where the mode parameter rather than the oflags parameter is checked for
the O_NONBLOCK flag.

Signed-off-by: Matthew Hodgson <matthew@mxtelecom.com>
alsa/pcm.c

index 8aea2f688427ab98d50af70770a394ff0aa86d58..dc4695b267434be864cbf14f4ee6e8fdc9b57288 100644 (file)
@@ -534,7 +534,7 @@ static int oss_dsp_open(int card, int device, int oflag, mode_t mode)
                errno = ENOENT;
                return -1;
        }
-       if (mode & O_NONBLOCK)
+       if (oflag & O_NONBLOCK)
                pcm_mode = SND_PCM_NONBLOCK;
        switch (oflag & O_ACCMODE) {
        case O_RDONLY: