Klaus Demo nginx / 0abb0bc
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
1 changed file(s) with 8 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
7070 iov->iov_len += chain->buf->end - chain->buf->last;
7171
7272 } else {
73 if (vec.nelts >= IOV_MAX) {
74 break;
75 }
76
7377 iov = ngx_array_push(&vec);
7478 if (iov == NULL) {
7579 return NGX_ERROR;
194198 iov->iov_len += chain->buf->end - chain->buf->last;
195199
196200 } else {
201 if (vec.nelts >= IOV_MAX) {
202 break;
203 }
204
197205 iov = ngx_array_push(&vec);
198206 if (iov == NULL) {
199207 return NGX_ERROR;