Mercurial > hg > nginx-quic
comparison src/os/unix/ngx_writev_chain.c @ 4595:6cd5d4a279d6
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).
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 17 Apr 2012 09:10:50 +0000 |
parents | d620f497c50f |
children | 089cc5154c1e |
comparison
equal
deleted
inserted
replaced
4594:7d0561b2e0fb | 4595:6cd5d4a279d6 |
---|---|
52 if (limit == 0 || limit > (off_t) (NGX_MAX_SIZE_T_VALUE - ngx_pagesize)) { | 52 if (limit == 0 || limit > (off_t) (NGX_MAX_SIZE_T_VALUE - ngx_pagesize)) { |
53 limit = NGX_MAX_SIZE_T_VALUE - ngx_pagesize; | 53 limit = NGX_MAX_SIZE_T_VALUE - ngx_pagesize; |
54 } | 54 } |
55 | 55 |
56 send = 0; | 56 send = 0; |
57 complete = 0; | |
58 | 57 |
59 vec.elts = iovs; | 58 vec.elts = iovs; |
60 vec.size = sizeof(struct iovec); | 59 vec.size = sizeof(struct iovec); |
61 vec.nalloc = NGX_IOVS; | 60 vec.nalloc = NGX_IOVS; |
62 vec.pool = c->pool; | 61 vec.pool = c->pool; |
63 | 62 |
64 for ( ;; ) { | 63 for ( ;; ) { |
65 prev = NULL; | 64 prev = NULL; |
66 iov = NULL; | 65 iov = NULL; |
67 eintr = 0; | 66 eintr = 0; |
67 complete = 0; | |
68 prev_send = send; | 68 prev_send = send; |
69 | 69 |
70 vec.nelts = 0; | 70 vec.nelts = 0; |
71 | 71 |
72 /* create the iovec and coalesce the neighbouring bufs */ | 72 /* create the iovec and coalesce the neighbouring bufs */ |