mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
rpmsgdev_server: do not notify the client when the fds has teardown
Donothing instead assert when poll notify is called after teardown. Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This commit is contained in:
@@ -324,15 +324,16 @@ static void rpmsgdev_poll_worker(FAR void *arg)
|
|||||||
container_of(fds, FAR struct rpmsgdev_device_s, fd);
|
container_of(fds, FAR struct rpmsgdev_device_s, fd);
|
||||||
FAR struct rpmsgdev_notify_s msg;
|
FAR struct rpmsgdev_notify_s msg;
|
||||||
|
|
||||||
DEBUGASSERT(dev->cfd != 0);
|
if (dev->cfd != 0)
|
||||||
|
{
|
||||||
|
msg.header.command = RPMSGDEV_NOTIFY;
|
||||||
|
msg.revents = fds->revents;
|
||||||
|
msg.fds = dev->cfd;
|
||||||
|
|
||||||
msg.header.command = RPMSGDEV_NOTIFY;
|
fds->revents = 0;
|
||||||
msg.revents = fds->revents;
|
|
||||||
msg.fds = dev->cfd;
|
|
||||||
|
|
||||||
fds->revents = 0;
|
rpmsg_send(&server->ept, &msg, sizeof(msg));
|
||||||
|
}
|
||||||
rpmsg_send(&server->ept, &msg, sizeof(msg));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user