From c1bf0122111a0192fb6e31eeafd5af43b4f8ef15 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Thu, 6 Aug 2020 10:50:56 +0900 Subject: [PATCH] netutils/usrsock_rpmsg: Change to pass the flags to the psock interface Pass the sendto/recvfrom flags argument to the psock interface. --- netutils/usrsock_rpmsg/usrsock_rpmsg_server.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/netutils/usrsock_rpmsg/usrsock_rpmsg_server.c b/netutils/usrsock_rpmsg/usrsock_rpmsg_server.c index a15f42553..6155c4619 100644 --- a/netutils/usrsock_rpmsg/usrsock_rpmsg_server.c +++ b/netutils/usrsock_rpmsg/usrsock_rpmsg_server.c @@ -348,7 +348,8 @@ static int usrsock_rpmsg_sendto_handler(struct rpmsg_endpoint *ept, if (req->usockid >= 0 && req->usockid < CONFIG_NSOCKET_DESCRIPTORS) { ret = psock_sendto(&priv->socks[req->usockid], - (const void *)(req + 1) + req->addrlen, req->buflen, 0, + (const void *)(req + 1) + req->addrlen, req->buflen, + req->flags, req->addrlen ? (const struct sockaddr *)(req + 1) : NULL, req->addrlen); } @@ -395,7 +396,7 @@ static int usrsock_rpmsg_recvfrom_handler(struct rpmsg_endpoint *ept, if (req->usockid >= 0 && req->usockid < CONFIG_NSOCKET_DESCRIPTORS) { ret = psock_recvfrom(&priv->socks[req->usockid], - (void *)(ack + 1) + inaddrlen, buflen, 0, + (void *)(ack + 1) + inaddrlen, buflen, req->flags, outaddrlen ? (struct sockaddr *)(ack + 1) : NULL, outaddrlen ? &outaddrlen : NULL); if (ret > 0 && outaddrlen < inaddrlen)