mirror of
https://github.com/nginx/nginx.git
synced 2024-12-02 13:39:24 -06:00
Fixed another return in unix ngx_write_chain_to_file().
Previous patch missed special case for one iovec, it needs total bytes written to be returned as well.
This commit is contained in:
parent
aecb2eda13
commit
ce61ff9c45
@ -204,8 +204,15 @@ ngx_write_chain_to_file(ngx_file_t *file, ngx_chain_t *cl, off_t offset,
|
|||||||
|
|
||||||
if (vec.nelts == 1) {
|
if (vec.nelts == 1) {
|
||||||
iov = vec.elts;
|
iov = vec.elts;
|
||||||
return ngx_write_file(file, (u_char *) iov[0].iov_base,
|
|
||||||
iov[0].iov_len, offset);
|
n = ngx_write_file(file, (u_char *) iov[0].iov_base,
|
||||||
|
iov[0].iov_len, offset);
|
||||||
|
|
||||||
|
if (n == NGX_ERROR) {
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
|
return total + n;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file->sys_offset != offset) {
|
if (file->sys_offset != offset) {
|
||||||
|
Loading…
Reference in New Issue
Block a user