diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2012-04-17 09:10:50 +0000 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2012-04-17 09:10:50 +0000 |
commit | 96d73e291f77152d6494f7cb969ec0cd3bb74215 (patch) | |
tree | e68032b4aa62ec235f53e005313f25f0448c5d41 /src | |
parent | 9e2f86cfc01e1841b7db727ce2d5282f07364d46 (diff) | |
download | nginx-96d73e291f77152d6494f7cb969ec0cd3bb74215.tar.gz nginx-96d73e291f77152d6494f7cb969ec0cd3bb74215.zip |
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).
Diffstat (limited to 'src')
-rw-r--r-- | src/os/unix/ngx_solaris_sendfilev_chain.c | 2 | ||||
-rw-r--r-- | src/os/unix/ngx_writev_chain.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/os/unix/ngx_solaris_sendfilev_chain.c b/src/os/unix/ngx_solaris_sendfilev_chain.c index d68220dc3..64e59aa2e 100644 --- a/src/os/unix/ngx_solaris_sendfilev_chain.c +++ b/src/os/unix/ngx_solaris_sendfilev_chain.c @@ -74,7 +74,6 @@ ngx_solaris_sendfilev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit) send = 0; - complete = 0; vec.elts = sfvs; 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; sfv = NULL; eintr = 0; + complete = 0; sent = 0; prev_send = send; diff --git a/src/os/unix/ngx_writev_chain.c b/src/os/unix/ngx_writev_chain.c index 579fdecc8..a752b1f91 100644 --- a/src/os/unix/ngx_writev_chain.c +++ b/src/os/unix/ngx_writev_chain.c @@ -54,7 +54,6 @@ ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit) } send = 0; - complete = 0; vec.elts = iovs; 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; iov = NULL; eintr = 0; + complete = 0; prev_send = send; vec.nelts = 0; |