Current code was considering "can read" as having either POLLIN or POLLPRI being
set.
This may lead to client being awaken because of POLLPRI, starting a blocking
read and getting stuck because there is actually nothing to read.
This patch removes POLLPRI handling in read code and I'll add specific
API to wait for POLLPRI.
https://bugzilla.gnome.org/show_bug.cgi?id=794977
struct pollfd *pfd = &g_array_index (set->fds, struct pollfd, idx);
if (active)
struct pollfd *pfd = &g_array_index (set->fds, struct pollfd, idx);
if (active)
- pfd->events |= (POLLIN | POLLPRI);
- pfd->events &= ~(POLLIN | POLLPRI);
+ pfd->events &= ~POLLIN;
#else
gst_poll_update_winsock_event_mask (set, idx, FD_READ | FD_ACCEPT, active);
#endif
#else
gst_poll_update_winsock_event_mask (set, idx, FD_READ | FD_ACCEPT, active);
#endif
#ifndef G_OS_WIN32
struct pollfd *pfd = &g_array_index (set->active_fds, struct pollfd, idx);
#ifndef G_OS_WIN32
struct pollfd *pfd = &g_array_index (set->active_fds, struct pollfd, idx);
- res = (pfd->revents & (POLLIN | POLLPRI)) != 0;
+ res = (pfd->revents & POLLIN) != 0;
#else
WinsockFd *wfd = &g_array_index (set->active_fds, WinsockFd, idx);
#else
WinsockFd *wfd = &g_array_index (set->active_fds, WinsockFd, idx);