Diff between a834df8c7dc4499975b60241951265f98c29c601 and 10a0350126bb517c36ac1d0d95e4995b6e303d8f
Changed Files
| File | Additions | Deletions | Status |
| audio/pcm_bluetooth.c | +2 | -2 | modified |
Full Patch
diff --git a/audio/pcm_bluetooth.c b/audio/pcm_bluetooth.c
index 2c21e05..e633d1a 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;