rpmsg_socket: use sendto_nocopy() instead of send_nocopy().

only wait ept ready after ept_create, not after ept_destroy

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2022-07-20 22:46:46 +08:00 committed by Petro Karashchenko
parent 9c106c1bdc
commit 79952163c1

View File

@ -1010,7 +1010,8 @@ static ssize_t rpmsg_socket_send_continuous(FAR struct socket *psock,
rpmsg_socket_unlock(&conn->sendlock);
ret = rpmsg_send_nocopy(&conn->ept, msg, block + sizeof(*msg));
ret = rpmsg_sendto_nocopy(&conn->ept, msg, block + sizeof(*msg),
conn->ept.dest_addr);
if (ret < 0)
{
break;
@ -1111,7 +1112,7 @@ static ssize_t rpmsg_socket_send_single(FAR struct socket *psock,
rpmsg_socket_unlock(&conn->sendlock);
ret = rpmsg_send_nocopy(&conn->ept, msg, total);
ret = rpmsg_sendto_nocopy(&conn->ept, msg, total, conn->ept.dest_addr);
return ret > 0 ? len : ret;
}