mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
net/local: Skip poll_notify in local_event_pollsetup if no event happen
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
155768bae3
commit
b0e3a35c39
@@ -46,7 +46,6 @@ static int local_event_pollsetup(FAR struct local_conn_s *conn,
|
|||||||
FAR struct pollfd *fds,
|
FAR struct pollfd *fds,
|
||||||
bool setup)
|
bool setup)
|
||||||
{
|
{
|
||||||
pollevent_t eventset;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (setup)
|
if (setup)
|
||||||
@@ -79,14 +78,11 @@ static int local_event_pollsetup(FAR struct local_conn_s *conn,
|
|||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
eventset = 0;
|
|
||||||
if (conn->lc_state == LOCAL_STATE_LISTENING &&
|
if (conn->lc_state == LOCAL_STATE_LISTENING &&
|
||||||
dq_peek(&conn->u.server.lc_waiters) != NULL)
|
dq_peek(&conn->u.server.lc_waiters) != NULL)
|
||||||
{
|
{
|
||||||
eventset |= POLLIN;
|
poll_notify(&fds, 1, POLLIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
poll_notify(&fds, 1, eventset);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user