]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Return correct error in snd_pcm_wait() after snd_pcm_poll_descriptors() call
authorJaroslav Kysela <perex@perex.cz>
Fri, 12 Nov 2004 20:27:31 +0000 (20:27 +0000)
committerJaroslav Kysela <perex@perex.cz>
Fri, 12 Nov 2004 20:27:31 +0000 (20:27 +0000)
src/pcm/pcm.c

index ce0f2408c08b164c57f56afb217f901fef1df2d6..30741efe59c1300b45c26f6433d06dbfc42f10c1 100644 (file)
@@ -2094,6 +2094,8 @@ int snd_pcm_wait(snd_pcm_t *pcm, int timeout)
                }
        }
        err = snd_pcm_poll_descriptors(pcm, &pfd, 1);
+       if (err < 0)
+               return err;
        assert(err == 1);
       __retry:
        err_poll = poll(&pfd, 1, timeout);