net/local: Fix receive data size calculation for local_recvmsg
In psock_dgram_recvfrom function, fix code logic.
This commit is contained in:
parent
1060953567
commit
d17d877764
|
@ -289,7 +289,7 @@ psock_dgram_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len,
|
|||
{
|
||||
/* Read 32 bytes into the bit bucket */
|
||||
|
||||
readlen = MIN(remaining, 32);
|
||||
tmplen = MIN(remaining, 32);
|
||||
ret = psock_fifo_read(psock, bitbucket, &tmplen, false);
|
||||
if (ret < 0)
|
||||
{
|
||||
|
@ -302,6 +302,7 @@ psock_dgram_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len,
|
|||
|
||||
DEBUGASSERT(tmplen <= remaining);
|
||||
remaining -= tmplen;
|
||||
readlen += tmplen;
|
||||
}
|
||||
while (remaining > 0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue