This commit is contained in:
archer 2026-08-01 16:13:52 +08:00 committed by GitHub
commit 95ac59a577
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -126,6 +126,11 @@ static int rpmsg_ping_once(FAR struct rpmsg_endpoint *ept, int len,
FAR struct rpmsg_ping_msg_s *msg;
int ret;
if (!is_rpmsg_ept_ready(ept))
{
return -ENOTCONN;
}
msg = rpmsg_get_tx_payload_buffer(ept, buf_len, true);
if (!msg)
{
@ -162,7 +167,7 @@ static int rpmsg_ping_once(FAR struct rpmsg_endpoint *ept, int len,
msg->cookie = (uintptr_t)&sem;
nxsem_init(&sem, 0, 0);
ret = rpmsg_send_nocopy(ept, msg, msg->len);
ret = rpmsg_sendto_nocopy(ept, msg, msg->len, ept->dest_addr);
if (ret >= 0)
{
nxsem_wait_uninterruptible(&sem);
@ -172,7 +177,7 @@ static int rpmsg_ping_once(FAR struct rpmsg_endpoint *ept, int len,
}
else
{
ret = rpmsg_send_nocopy(ept, msg, msg->len);
ret = rpmsg_sendto_nocopy(ept, msg, msg->len, ept->dest_addr);
}
if (ret < 0)