Move the poll() call outside the #ifdef checking for ppoll, since we want the poll in all cases. Prior to this change the check for negative return values of poll/ppoll was never actually executed when ppoll() was available

git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1915 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2007-09-28 13:00:35 +00:00
parent f8c17861b8
commit 229afb5e2d

View file

@ -379,17 +379,16 @@ int pa_rtpoll_run(pa_rtpoll *p, pa_bool_t wait) {
else else
#endif #endif
#else
r = poll(p->pollfd, p->n_pollfd_used, p->timer_enabled > 0 ? (timeout.tv_sec*1000) + (timeout.tv_nsec / 1000000) : -1);
#endif #endif
r = poll(p->pollfd, p->n_pollfd_used, p->timer_enabled > 0 ? (timeout.tv_sec*1000) + (timeout.tv_nsec / 1000000) : -1);
if (r < 0) { if (r < 0) {
reset_all_revents(p);
if (errno == EAGAIN || errno == EINTR) if (errno == EAGAIN || errno == EINTR)
r = 0; r = 0;
else else
pa_log_error("poll(): %s", pa_cstrerror(errno)); pa_log_error("poll(): %s", pa_cstrerror(errno));
reset_all_revents(p);
} }
if (p->timer_enabled) { if (p->timer_enabled) {