From 3c9755bb7e7a93638aff6a2d9a583c262c6575b0 Mon Sep 17 00:00:00 2001 From: Abramo Bagnara Date: Fri, 14 Jul 2000 09:31:23 +0000 Subject: [PATCH] Better handling of odd situations --- src/pcm/plugin/mmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pcm/plugin/mmap.c b/src/pcm/plugin/mmap.c index 5bfb2193..7b75aa8c 100644 --- a/src/pcm/plugin/mmap.c +++ b/src/pcm/plugin/mmap.c @@ -76,7 +76,7 @@ static ssize_t mmap_src_channels(snd_pcm_plugin_t *plugin, ready = poll(&pfd, 1, 10000); if (ready < 0) return ready; - if (ready && pfd.revents & POLLERR) + if (ready == 0 || (pfd.revents & POLLERR)) return -EPIPE; assert(snd_pcm_mmap_ready(stream)); } @@ -143,7 +143,7 @@ static ssize_t mmap_dst_channels(snd_pcm_plugin_t *plugin, ready = poll(&pfd, 1, 10000); if (ready < 0) return ready; - if (ready && pfd.revents & POLLERR) + if (ready == 0 || (pfd.revents & POLLERR)) return -EPIPE; assert(snd_pcm_mmap_ready(stream)); } -- 2.47.1