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

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