You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/07/23 05:16:58 UTC

[incubator-nuttx] 05/05: rpmsg_socket: use sendto_nocopy() instead of send_nocopy().

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 79952163c144468a145f8e777c54bef2dc193409
Author: ligd <li...@xiaomi.com>
AuthorDate: Wed Jul 20 22:46:46 2022 +0800

    rpmsg_socket: use sendto_nocopy() instead of send_nocopy().
    
    only wait ept ready after ept_create, not after ept_destroy
    
    Signed-off-by: ligd <li...@xiaomi.com>
---
 net/rpmsg/rpmsg_sockif.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/rpmsg/rpmsg_sockif.c b/net/rpmsg/rpmsg_sockif.c
index 67070b86f1..624457ed2e 100644
--- a/net/rpmsg/rpmsg_sockif.c
+++ b/net/rpmsg/rpmsg_sockif.c
@@ -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;
 }