libubus: fix writev_retry() function when writing large packets
Seems this bug stayed hidden for a while, because the write/sendmsg function can send up to ~200k in one send, so it looked at first why there was some data mismatch.
This commit is contained in:
parent
82da9db3a9
commit
5db90dbc94
1 changed files with 3 additions and 0 deletions
|
@ -111,7 +111,10 @@ static int writev_retry(int fd, struct iovec *iov, int iov_len, int sock_fd)
|
|||
if (!iov_len)
|
||||
return len;
|
||||
}
|
||||
iov->iov_base += cur_len;
|
||||
iov->iov_len -= cur_len;
|
||||
msghdr.msg_iov = iov;
|
||||
msghdr.msg_iovlen = iov_len;
|
||||
} while (1);
|
||||
|
||||
/* Should never reach here */
|
||||
|
|
Loading…
Add table
Reference in a new issue