net/usrsock: allow usrsock *DATA_ACK with no-preload data
allow usrsock USRSOCK_MESSAGE_RESPONSE_DATA_ACK with no-preload data so addrlen could be updated to valuelen_nontrunc of usrsock_message_datareq_ack_s nsh> usrsocktest ... Testing group "basic_getsockname" => [TEST ASSERT FAILED!] In function "basic_getsockname_open": line 170: Assertion `(ssize_t)((ret)) == (ssize_t)((0))' failed. got value: -1 should be: 0 Group "basic_getsockname": [FAILED] Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
parent
3a653c1d5e
commit
5d4c774352
@ -851,6 +851,8 @@ static ssize_t usrsockdev_write(FAR struct file *filep,
|
||||
|
||||
/* Copy data from user-space. */
|
||||
|
||||
if (len != 0)
|
||||
{
|
||||
ret = iovec_put(conn->resp.datain.iov, conn->resp.datain.iovcnt,
|
||||
conn->resp.datain.pos, buffer, len);
|
||||
if (ret < 0)
|
||||
@ -869,6 +871,7 @@ static ssize_t usrsockdev_write(FAR struct file *filep,
|
||||
len -= ret;
|
||||
ret = origlen - len;
|
||||
}
|
||||
}
|
||||
|
||||
if (conn->resp.datain.pos == conn->resp.datain.total)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user