Make sure pollfd[POLLFD_ASYNCQ].revents is properly initialized on signal

git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1507 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2007-07-12 16:00:51 +00:00
parent 683fc4cef8
commit 1a84664edb

View file

@ -142,6 +142,8 @@ static int suspend(struct userdata *u) {
ioctl(u->fd, SNDCTL_DSP_SYNC, NULL);
close(u->fd);
u->fd = -1;
pa_log_debug("Device suspended...");
return 0;
}
@ -208,6 +210,8 @@ static int unsuspend(struct userdata *u) {
pa_xfree(buf);
}
pa_log_debug("Resumed successfully...");
return 0;
fail:
@ -610,8 +614,11 @@ static void thread_func(void *userdata) {
pollfd[POLLFD_DSP].revents = 0;
if (r < 0) {
if (errno == EINTR)
if (errno == EINTR) {
pollfd[POLLFD_ASYNCQ].revents = 0;
pollfd[POLLFD_DSP].revents = 0;
continue;
}
pa_log("poll() failed: %s", pa_cstrerror(errno));
goto fail;