aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2011-05-11 15:36:34 +0200
committerJohan Hedberg <jh@dell.(none)>2011-05-15 01:47:12 +0300
commit10a0350126bb517c36ac1d0d95e4995b6e303d8f (patch)
tree0b746ca1addab3984a9419660c0a585299ff8b25 /audio
parenta834df8c7dc4499975b60241951265f98c29c601 (diff)
downloadbluez-10a0350126bb517c36ac1d0d95e4995b6e303d8f.tar.gz
Report error if read failed in bluetooth_playback_poll_revents
Diffstat (limited to 'audio')
-rw-r--r--audio/pcm_bluetooth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/pcm_bluetooth.c b/audio/pcm_bluetooth.c
index 2c21e058..e633d1a4 100644
--- a/audio/pcm_bluetooth.c
+++ b/audio/pcm_bluetooth.c
@@ -820,7 +820,6 @@ static int bluetooth_playback_poll_revents(snd_pcm_ioplug_t *io,
unsigned short *revents)
{
static char buf[1];
- int ret;
DBG("");
@@ -831,7 +830,8 @@ static int bluetooth_playback_poll_revents(snd_pcm_ioplug_t *io,
assert(pfds[1].fd >= 0);
if (io->state != SND_PCM_STATE_PREPARED)
- ret = read(pfds[0].fd, buf, 1);
+ if (read(pfds[0].fd, buf, 1) < 0)
+ SYSERR("read error: %s (%d)", strerror(errno), errno);
if (pfds[1].revents & (POLLERR | POLLHUP | POLLNVAL))
io->state = SND_PCM_STATE_DISCONNECTED;