When readahead data is available, poll needs to return POLLIN or POLLRDNORM, not POLLOUT
This commit is contained in:
parent
16d04c7aa7
commit
9d280a58aa
@ -4774,4 +4774,6 @@
|
||||
STM32L-Discovery's segment LCD (2013-5-22).
|
||||
* fs/fs_poll.c: Poll setup/teardown logic should ignore invalid (i.e.,
|
||||
negative) file descriptors. Max Holtzberg (2013-5-23).
|
||||
|
||||
* net/net_poll.c: When readahead data is availalbe, the network poll
|
||||
logic should set POLLIN (or POLLRDNORM), not POLLOUT. Max Holtzberg
|
||||
(2013-5-23)
|
||||
|
@ -59,12 +59,14 @@
|
||||
* Priority data may be read without blocking.
|
||||
* POLLPRI
|
||||
* High priority data may be read without blocking.
|
||||
*
|
||||
* POLLOUT
|
||||
* Normal data may be written without blocking.
|
||||
* POLLWRNORM
|
||||
* Equivalent to POLLOUT.
|
||||
* POLLWRBAND
|
||||
* Priority data may be written.
|
||||
*
|
||||
* POLLERR
|
||||
* An error has occurred (revents only).
|
||||
* POLLHUP
|
||||
|
@ -250,7 +250,9 @@ static inline int net_pollsetup(FAR struct socket *psock,
|
||||
if (!sq_empty(&conn->readahead))
|
||||
#endif
|
||||
{
|
||||
fds->revents |= (POLLOUT & fds->events);
|
||||
/* Normal data may be read without blocking. */
|
||||
|
||||
fds->revents |= (POLLRDNORM & fds->events);
|
||||
}
|
||||
|
||||
/* Check for a loss of connection events. We need to be careful here.
|
||||
|
Loading…
Reference in New Issue
Block a user