usrsock: only TCP data should be aggregrated for rpmsg case

non-streaming socket's rx data should not be aggregrated.

Signed-off-by: 梁超众 <liangchaozhong@xiaomi.com>
This commit is contained in:
梁超众 2023-01-10 18:31:35 +08:00 committed by Petro Karashchenko
parent 5bd448825b
commit 7b8ef5dc1b
1 changed files with 2 additions and 1 deletions

View File

@ -533,7 +533,8 @@ static int usrsock_rpmsg_recvfrom_handler(FAR struct rpmsg_endpoint *ept,
outaddrlen ? (FAR struct sockaddr *)(ack + 1) : NULL,
outaddrlen ? &outaddrlen : NULL);
totlen = ret;
if (ret > 0)
if (ret > 0 && (priv->socks[req->usockid].s_type & SOCK_TYPE_MASK) ==
SOCK_STREAM)
{
if (outaddrlen < inaddrlen)
{