rpmsg_sockif: block poll shoud not set POLLERR

Support poll rpmsg socket fd with block mode

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This commit is contained in:
Bowen Wang 2023-08-16 17:11:52 +08:00 committed by Xiang Xiao
parent 4c39cdce09
commit 5bc32727b4
1 changed files with 9 additions and 7 deletions

View File

@ -918,14 +918,16 @@ static int rpmsg_socket_poll(FAR struct socket *psock,
nxmutex_unlock(&conn->recvlock);
}
else if (!_SS_ISCONNECTED(conn->sconn.s_flags) &&
_SS_ISNONBLOCK(conn->sconn.s_flags))
else /* !_SS_ISCONNECTED(conn->sconn.s_flags) */
{
ret = OK;
}
else
{
eventset |= POLLERR;
if (!conn->ept.rdev || conn->unbind)
{
eventset |= POLLHUP;
}
else
{
ret = OK;
}
}
rpmsg_socket_poll_notify(conn, eventset);