mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
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:
@@ -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.
|
||||
*/
|
||||
|
||||
else if ((fds->events && POLLWRNORM) == 0 ||
|
||||
(fds->revents && POLLWRNORM) != 0)
|
||||
else if ((fds->events & POLLWRNORM) != 0 &&
|
||||
(fds->revents & POLLWRNORM) == 0)
|
||||
{
|
||||
/* Check if we are now able to send */
|
||||
|
||||
|
||||
@@ -185,8 +185,8 @@ static inline void udp_iob_work(FAR void *arg)
|
||||
* event. If so, don't do it again.
|
||||
*/
|
||||
|
||||
if ((fds->events && POLLWRNORM) == 0 ||
|
||||
(fds->revents && POLLWRNORM) != 0)
|
||||
if ((fds->events & POLLWRNORM) != 0 &&
|
||||
(fds->revents & POLLWRNORM) == 0)
|
||||
{
|
||||
/* Check if we are now able to send */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user