mirror of
https://github.com/nginx/nginx.git
synced 2025-06-10 19:42:39 +08:00
Fixed loop in ngx_writev_chain() and ngx_solaris_sendfilev_chain().
The "complete" flag wasn't cleared on loop iteration start, resulting in broken behaviour if there were more than IOV_MAX buffers and first iteration was fully completed (and hence the "complete" flag was set to 1).
This commit is contained in:
parent
9e2f86cfc0
commit
96d73e291f
@ -74,7 +74,6 @@ ngx_solaris_sendfilev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
|
|||||||
|
|
||||||
|
|
||||||
send = 0;
|
send = 0;
|
||||||
complete = 0;
|
|
||||||
|
|
||||||
vec.elts = sfvs;
|
vec.elts = sfvs;
|
||||||
vec.size = sizeof(sendfilevec_t);
|
vec.size = sizeof(sendfilevec_t);
|
||||||
@ -87,6 +86,7 @@ ngx_solaris_sendfilev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
|
|||||||
fprev = 0;
|
fprev = 0;
|
||||||
sfv = NULL;
|
sfv = NULL;
|
||||||
eintr = 0;
|
eintr = 0;
|
||||||
|
complete = 0;
|
||||||
sent = 0;
|
sent = 0;
|
||||||
prev_send = send;
|
prev_send = send;
|
||||||
|
|
||||||
|
@ -54,7 +54,6 @@ ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
|
|||||||
}
|
}
|
||||||
|
|
||||||
send = 0;
|
send = 0;
|
||||||
complete = 0;
|
|
||||||
|
|
||||||
vec.elts = iovs;
|
vec.elts = iovs;
|
||||||
vec.size = sizeof(struct iovec);
|
vec.size = sizeof(struct iovec);
|
||||||
@ -65,6 +64,7 @@ ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
|
|||||||
prev = NULL;
|
prev = NULL;
|
||||||
iov = NULL;
|
iov = NULL;
|
||||||
eintr = 0;
|
eintr = 0;
|
||||||
|
complete = 0;
|
||||||
prev_send = send;
|
prev_send = send;
|
||||||
|
|
||||||
vec.nelts = 0;
|
vec.nelts = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user