Fixed ngx_readv_chain() to honor IOV_MAX (ticket #14).
Not using full chain passed is ok as consumers are expected to check
event's ready flag to determine if another call is needed, not the
returned size.
Maxim Dounin
10 years ago
70 | 70 | iov->iov_len += chain->buf->end - chain->buf->last; |
71 | 71 | |
72 | 72 | } else { |
73 | if (vec.nelts >= IOV_MAX) { | |
74 | break; | |
75 | } | |
76 | ||
73 | 77 | iov = ngx_array_push(&vec); |
74 | 78 | if (iov == NULL) { |
75 | 79 | return NGX_ERROR; |
194 | 198 | iov->iov_len += chain->buf->end - chain->buf->last; |
195 | 199 | |
196 | 200 | } else { |
201 | if (vec.nelts >= IOV_MAX) { | |
202 | break; | |
203 | } | |
204 | ||
197 | 205 | iov = ngx_array_push(&vec); |
198 | 206 | if (iov == NULL) { |
199 | 207 | return NGX_ERROR; |