net/tcp/tcp_netpoll.c and net/udp/udp_netpoll.c: In [tcp|udp]_iob_work fix the wrong condition logic (& vs &&).

This commit is contained in:
Xiang Xiao 2019-11-25 09:32:24 -06:00 committed by Gregory Nutt
parent c86fabb9b2
commit af9c67ab58
2 changed files with 4 additions and 4 deletions

View File

@ -212,8 +212,8 @@ static inline void tcp_iob_work(FAR void *arg)
* event. If so, don't do it again and don't setup notification again. * event. If so, don't do it again and don't setup notification again.
*/ */
else if ((fds->events && POLLWRNORM) == 0 || else if ((fds->events & POLLWRNORM) != 0 &&
(fds->revents && POLLWRNORM) != 0) (fds->revents & POLLWRNORM) == 0)
{ {
/* Check if we are now able to send */ /* Check if we are now able to send */

View File

@ -185,8 +185,8 @@ static inline void udp_iob_work(FAR void *arg)
* event. If so, don't do it again. * event. If so, don't do it again.
*/ */
if ((fds->events && POLLWRNORM) == 0 || if ((fds->events & POLLWRNORM) != 0 &&
(fds->revents && POLLWRNORM) != 0) (fds->revents & POLLWRNORM) == 0)
{ {
/* Check if we are now able to send */ /* Check if we are now able to send */